Ruby on Rails latest stable (v4.2.7) - 0 notes

Autoload and eager load conveniences for your library.

This module allows you to define autoloads based on Rails conventions (i.e. no need to define the path it is automatically guessed based on the filename) and also define a set of constants that needs to be eager loaded:

module MyLib
  extend ActiveSupport::Autoload

  autoload :Model

  eager_autoload do
    autoload :Cache

Then your library can be eager loaded by simply calling:

Show files where this module is defined (1 file)
Register or log in to add new notes.