module Autoload
Ruby on Rails 4.2.9
Since v3.0.20Autoload 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!
Methods (defined here)
- # autoload
- # autoload_at
- # autoloads
- # autoload_under
- # eager_autoload
- # eager_load!
Used by
Extendd by (22)
- AbstractController
- ActionController
- ActionController::Caching
- ActionDispatch
- ActionDispatch::Http
- ActionDispatch::Routing
- ActionMailer
- ActionView
- ActionView::Template
- ActiveJob
- ActiveJob::QueueAdapters
- ActiveModel
- ActiveModel::Serializers
- ActiveRecord
- ActiveRecord::AttributeMethods
- ActiveRecord::ConnectionAdapters
- ActiveRecord::Locking
- ActiveRecord::Scoping
- ActiveRecord::Tasks
- ActiveSupport
- ActiveSupport::NumberHelper
- Rails