module ActiveSupport::LazyLoadHooks

def on_load(name, options = {}, &block)

* :run_once - Given +block+ will run only once.
* :yield - Yields the object that run_load_hooks to +block+.

Options:

immediately.
loaded. If the component has already loaded, the block is executed
Declares a block that will be executed when a \Rails component is fully
def on_load(name, options = {}, &block)
  @loaded[name].each do |base|
    execute_hook(name, base, options, block)
  end
  @load_hooks[name] << [block, options]
end