Module: ControllerSupport::Base

Includes:
ActiveSupport::Concern
Defined in:
lib/controller_support/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



8
9
10
# File 'lib/controller_support/base.rb', line 8

def self.extended(base)
  base.instance_variable_set("@_dependencies", [])
end

Instance Method Details

#append_features(base) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/controller_support/base.rb', line 12

def append_features(base)
  super(base)
  unless base.instance_variable_defined?("@_dependencies")
    if instance_variable_defined?("@_custom_blocks")
      @_custom_blocks.each do |block|
        base.class_eval(&block)
      end
    end
  end
end