class AutomationObject::State::ActionLoop
Composite
action loop base class
Attributes
blue_prints[RW]
@return [AutomationObject::BluePrint::Composite::Base]
composite[RW]
@return [AutomationObject::State::Base]
driver[RW]
@return [AutomationObject::Driver::Driver]
loops[RW]
@return [Integer]
Public Class Methods
new(composite, driver, blue_prints, loops = 30)
click to toggle source
@param composite [AutomationObject::State::Composite::Base] @param driver [AutomationObject::Driver::Driver] @param blue_prints
[AutomationObject::BluePrint::Composite::Base] @param loops [Integer]
# File lib/automation_object/state/hook_actions/action_loop.rb, line 20 def initialize(composite, driver, blue_prints, loops = 30) self.composite = composite self.driver = driver self.blue_prints = blue_prints self.loops = loops end
Public Instance Methods
run()
click to toggle source
@return [Boolean] run success or not
# File lib/automation_object/state/hook_actions/action_loop.rb, line 28 def run loops.times do # Sub classes implement single run return true if single_run end false end
single_run()
click to toggle source
Abstract method, override @return [Boolean] success or not
# File lib/automation_object/state/hook_actions/action_loop.rb, line 39 def single_run raise NotImplementedError end