ruby - Why doesn't require add all names? -
i have file, my_helper.rb, looks this:
require 'cgi' require 'enumerator' module myhelper # ... end class myupstreamerror < standarderror # ... end when require 'my_helper' elsewhere, myhelper becomes visible, myupstreamerror not. why this?
ruby's require analogous include in c.
you might want have read though: http://rubylearning.com/satishtalim/including_other_files_in_ruby.html http://ionrails.com/2009/09/19/ruby_require-vs-load-vs-include-vs-extend/
Comments
Post a Comment