Class: IntegrationWorkflow
- Inherits:
-
Object
- Object
- IntegrationWorkflow
- Defined in:
- lib/integration_workflow.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#steps ⇒ Object
readonly
Returns the value of attribute steps.
Instance Method Summary collapse
-
#initialize(options = {}, &block) ⇒ IntegrationWorkflow
constructor
A new instance of IntegrationWorkflow.
- #run ⇒ Object
- #step(name, &block) ⇒ Object
Constructor Details
#initialize(options = {}, &block) ⇒ IntegrationWorkflow
Returns a new instance of IntegrationWorkflow.
7 8 9 10 11 |
# File 'lib/integration_workflow.rb', line 7 def initialize( = {}, &block) @steps = [] = instance_exec(&block) if block_given? end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/integration_workflow.rb', line 5 def end |
#steps ⇒ Object (readonly)
Returns the value of attribute steps.
5 6 7 |
# File 'lib/integration_workflow.rb', line 5 def steps @steps end |
Instance Method Details
#run ⇒ Object
18 19 20 |
# File 'lib/integration_workflow.rb', line 18 def run steps.each(&:run) end |
#step(name, &block) ⇒ Object
13 14 15 16 |
# File 'lib/integration_workflow.rb', line 13 def step(name, &block) step = Step.new(name, , &block) steps << step end |