Module: Rucola::InitializeHooks
- Defined in:
- lib/rucola/rucola_support/initialize_hooks.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
:nodoc.
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
:nodoc
17 18 19 |
# File 'lib/rucola/rucola_support/initialize_hooks.rb', line 17 def self.included(base) # :nodoc base.extend(ClassMethods) end |
Instance Method Details
#initialize ⇒ Object
11 12 13 14 15 |
# File 'lib/rucola/rucola_support/initialize_hooks.rb', line 11 def initialize # get the hooks, if they exist let them all do their after initialization work. hooks = self.class.instance_variable_get(:@_rucola_initialize_hooks) hooks.each { |hook| self.instance_eval(&hook) } unless hooks.nil? end |