Type:
Module

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
  end
end

Then your library can be eager loaded by simply calling:

MyLib.eager_load!
eager_load!

eager_load!() Instance Public methods

2015-06-20 00:00:00
autoloads

autoloads() Instance Public methods

2015-06-20 00:00:00
autoload_under

autoload_under(path) Instance Public methods

2015-06-20 00:00:00
autoload

autoload(const_name, path = @_at_path) Instance Public methods

2015-06-20 00:00:00
autoload_at

autoload_at(path) Instance Public methods

2015-06-20 00:00:00
eager_autoload

eager_autoload() Instance Public methods

2015-06-20 00:00:00