When extended in a class, automatically set up autoloading and set a module constant.
Walk the AUTOLOAD paths and manually require the configured paths.
def autoload_all
self::AUTOLOAD.values.each do |path|
require( path )
end
end
autoloader( classlist={} )
Call autoload for any class -> path pairs found in a classlist
hash. Set an AUTOLOAD constant to the configured hash.
def autoloader( classlist={} )
classlist.each_pair do |klass, path|
self.autoload( klass, path )
end
self.const_set( :AUTOLOAD, classlist )
end