Class: AutomationObject::State::HookAction
- Defined in:
- lib/automation_object/state/hook_action.rb
Overview
Hook action composite for managing state
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Composite
#children, #location, #name, #parent
Instance Method Summary collapse
-
#run ⇒ Boolean
Run success or not.
Methods inherited from Base
#get_child, #get_children, #initialize, #screen, #top
Methods inherited from Composite
#add_has_many_relationships, #add_has_one_relationships, #get_child, #get_children, has_many, has_many_relationships, has_one, has_one_relationships, #initialize, #top
Methods included from Reflection
Methods included from CompositeHook
#after_create_run, #before_create_run, included
Constructor Details
This class inherits a constructor from AutomationObject::State::Base
Instance Method Details
#run ⇒ Boolean
Returns run success or not
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/automation_object/state/hook_action.rb', line 21 def run blue_prints.hook_order.each do |hook_name| hook_action_class = AutomationObject::State.const_get(hook_name.to_s.pascalize) blue_prints = self.blue_prints.send(hook_name) hook_action = hook_action_class.new(self, driver, blue_prints) return false if hook_action.run == false # Use long form, can return nil! end true end |