Module: Rails::Initializable
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Classes:
| |
Extension / Inclusion / Inheritance Descendants | |
Included In:
::ActionCable::Engine ,
::ActionController::Railtie ,
::ActionDispatch::Railtie ,
::ActionMailbox::Engine ,
::ActionMailer::Railtie ,
::ActionText::Engine ,
::ActionView::Railtie ,
::ActiveJob::Railtie ,
::ActiveModel::Railtie ,
::ActiveRecord::Railtie ,
::ActiveStorage::Engine ,
::ActiveSupport::Railtie ,
::I18n::Railtie ,
Application ,
Application::Bootstrap ,
Application::Finisher ,
Engine ,
Railtie ,
TestUnitRailtie
| |
Defined in: | railties/lib/rails/initializable.rb |
Class Method Summary
- .included(base) Internal use only
Instance Method Summary
Class Method Details
.included(base)
This method is for internal use only.
[ GitHub ]
# File 'railties/lib/rails/initializable.rb', line 7
def self.included(base) # :nodoc: base.extend ClassMethods end
Instance Method Details
#initializers
[ GitHub ]# File 'railties/lib/rails/initializable.rb', line 96
def initializers @initializers ||= self.class.initializers_for(self) end
#run_initializers(group = :default, *args)
[ GitHub ]# File 'railties/lib/rails/initializable.rb', line 88
def run_initializers(group = :default, *args) return if instance_variable_defined?(:@ran) initializers.tsort_each do |initializer| initializer.run(*args) if initializer.belongs_to?(group) end @ran = true end