Method: ActiveSupport::LazyLoadHooks#run_load_hooks

Defined in:
activesupport/lib/active_support/lazy_load_hooks.rb

#run_load_hooks(name, base = Object) ⇒ Object

Executes all blocks registered to name via on_load, using base as the evaluation context.

ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base)

In the case of the above example, it will execute all hooks registered for :active_record within the class ActiveRecord::Base.



75
76
77
78
79
80
# File 'activesupport/lib/active_support/lazy_load_hooks.rb', line 75

def run_load_hooks(name, base = Object)
  @loaded[name] << base
  @load_hooks[name].each do |hook, options|
    execute_hook(name, base, options, hook)
  end
end