Module: AutomationObject::CompositeHook::ClassMethods
- Defined in:
- lib/automation_object/helpers/composite_hook.rb
Overview
Class level methods
Instance Method Summary collapse
- #after_create(instance_method) ⇒ Object
-
#after_create_hooks ⇒ Array<Symbol>
List of methods to call.
- #before_create(instance_method) ⇒ Object
-
#before_create_hooks ⇒ Array<Symbol>
List of methods to call.
Instance Method Details
#after_create(instance_method) ⇒ Object
26 27 28 |
# File 'lib/automation_object/helpers/composite_hook.rb', line 26 def after_create(instance_method) after_create_hooks.push(instance_method) end |
#after_create_hooks ⇒ Array<Symbol>
Returns list of methods to call
31 32 33 34 |
# File 'lib/automation_object/helpers/composite_hook.rb', line 31 def after_create_hooks @after_create_hooks = [] unless defined? @after_create_hooks @after_create_hooks end |
#before_create(instance_method) ⇒ Object
37 38 39 |
# File 'lib/automation_object/helpers/composite_hook.rb', line 37 def before_create(instance_method) before_create_hooks.push(instance_method) end |
#before_create_hooks ⇒ Array<Symbol>
Returns list of methods to call
42 43 44 45 |
# File 'lib/automation_object/helpers/composite_hook.rb', line 42 def before_create_hooks @before_create_hooks = [] unless defined? @before_create_hooks @before_create_hooks end |