Class: FlowObject::Runner
- Inherits:
-
Object
- Object
- FlowObject::Runner
- Defined in:
- lib/flow_object/runner.rb
Overview
Triggers flow execution and users callbacks
Instance Attribute Summary collapse
-
#callbacks ⇒ Object
readonly
Returns the value of attribute callbacks.
-
#failure ⇒ Object
readonly
Returns the value of attribute failure.
-
#flow ⇒ Object
readonly
Returns the value of attribute flow.
-
#step_name ⇒ Object
readonly
Returns the value of attribute step_name.
Instance Method Summary collapse
- #execute_plan ⇒ Object
-
#initialize(plan, callbacks, halt_if_proc) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(plan, callbacks, halt_if_proc) ⇒ Runner
Returns a new instance of Runner.
8 9 10 11 12 13 14 15 |
# File 'lib/flow_object/runner.rb', line 8 def initialize(plan, callbacks, halt_if_proc) @plan = plan @flow = flow @failure = false @step_name = nil @callbacks = callbacks @halt_if_proc = halt_if_proc end |
Instance Attribute Details
#callbacks ⇒ Object (readonly)
Returns the value of attribute callbacks.
6 7 8 |
# File 'lib/flow_object/runner.rb', line 6 def callbacks @callbacks end |
#failure ⇒ Object (readonly)
Returns the value of attribute failure.
6 7 8 |
# File 'lib/flow_object/runner.rb', line 6 def failure @failure end |
#flow ⇒ Object (readonly)
Returns the value of attribute flow.
6 7 8 |
# File 'lib/flow_object/runner.rb', line 6 def flow @flow end |
#step_name ⇒ Object (readonly)
Returns the value of attribute step_name.
6 7 8 |
# File 'lib/flow_object/runner.rb', line 6 def step_name @step_name end |
Instance Method Details
#execute_plan ⇒ Object
17 18 19 20 |
# File 'lib/flow_object/runner.rb', line 17 def execute_plan @flow = flow_builder.call self end |