18 Aug '17, 10am

@apotonick @weppos @_solnic_ @yukihiro_matz but see why it is not in the autoloading guide

if the class or module in which C is missing is Object let ns = '' else let M = the class or module in which C is missing if M is anonymous let ns = '' else let ns = M.name end end loop do # Look for a regular file. for dir in autoload_paths if the file "#{dir}/#{ns.underscore}/c.rb" exists load/require "#{dir}/#{ns.underscore}/c.rb" if C is now defined return else raise LoadError end end end # Look for an automatic module. for dir in autoload_paths if the directory "#{dir}/#{ns.underscore}/c" exists if ns is an empty string let C = Module.new in Object and return else let C = Module.new in ns.constantize and return end end end if ns is empty # We reached the top-level without finding the constant. raise NameError else if C exists in any of the parent namespaces # Qualified constants heuristic. raise NameError else # Try again in the parent namespace. let ns = the parent n...

Full article: http://guides.rubyonrails.org/autoloading_and_reloading_c...

Tweets

@apotonick @yukihiro_matz @_solnic_ AFAIK Rails...

github.com 18 Aug '17, 10am

Retrieve the constants that were present under the namespace when watch_namespaces

@realntl @apotonick @jankomarohnic @nikita_bulai

guides.rubyonrails.org 05 Aug '17, 6pm

if the class or module in which C is missing is Object let ns = '' else let M = the class or module in which C is missing ...