instance method
run_load_hooks
Ruby on Rails 7.2.3
Since v5.2.8.1Signature
run_load_hooks(name, base = 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.
Parameters
-
namereq -
baseopt = Object
Source
# 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
Defined in activesupport/lib/active_support/lazy_load_hooks.rb line 75
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::LazyLoadHooks