Skip to Content Skip to Search

module Rails::Initializable

Public instance methods

Source code GitHub
# File railties/lib/rails/initializable.rb, line 109
def initializers
  @initializers ||= self.class.initializers_for(self)
end
Source code GitHub
# File railties/lib/rails/initializable.rb, line 101
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

Namespace

Definition files