Class: Merb::Slices::Initialize

Inherits:
BootLoader show all
Defined in:
merb-slices/lib/merb-slices.rb

Overview

Call initialization method for each registered Slice.

This is done just before the app's after_load_callbacks are run. The application has been practically loaded completely, letting the callbacks work with what has been loaded.

Class Method Summary (collapse)

Methods inherited from BootLoader

after, after_app_loads, before, before_app_loads, before_master_shutdown, before_worker_shutdown, default_framework, finished?, inherited, move_klass

Class Method Details

+ (Object) run



100
101
102
103
104
105
# File 'merb-slices/lib/merb-slices.rb', line 100

def self.run
  Merb::Slices.each_slice do |slice|
    Merb.logger.verbose!("Initializing slice '#{slice}' ...")
    slice.init if slice.respond_to?(:init)
  end
end