Module: AutomationObject::CompositeHook
- Included in:
- Composite
- Defined in:
- lib/automation_object/helpers/composite_hook.rb
Overview
Hooks for composites
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
19 20 21 |
# File 'lib/automation_object/helpers/composite_hook.rb', line 19 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#after_create_run ⇒ Object
12 13 14 15 16 |
# File 'lib/automation_object/helpers/composite_hook.rb', line 12 def after_create_run self.class.after_create_hooks.each do |after_create_hook| send(after_create_hook) end end |
#before_create_run ⇒ Object
6 7 8 9 10 |
# File 'lib/automation_object/helpers/composite_hook.rb', line 6 def before_create_run self.class.before_create_hooks.each do |before_create_hook| send(before_create_hook) end end |