Class: Merb::Slices::Activate

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

Overview

Note:

Activation will only take place if the slice has been routed; this means you need have at least one slice route setup.

Call activation method for each registered Slice.

This is done right after the app’s after_load_callbacks are run. Any settings can be taken into account in the activation step.

Class Method Summary collapse

Class Method Details

.runObject



118
119
120
121
122
123
# File 'lib/merb-slices.rb', line 118

def self.run
  Merb::Slices.each_slice do |slice|
    Merb.logger.info!("Activating slice '#{slice}' ...")
    slice.activate if slice.respond_to?(:activate) && slice.routed?
  end
end