Ravn::

Autoloader module

When extended in a class, automatically set up autoloading and set a module constant.

Public Instance Methods

autoload_all()

Walk the AUTOLOAD paths and manually require the configured paths.

# File lib/ravn/mixins.rb, line 755
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.

# File lib/ravn/mixins.rb, line 743
def autoloader( classlist={} )
        classlist.each_pair do |klass, path|
                self.autoload( klass, path )
        end

        self.const_set( :AUTOLOAD, classlist )
end