Class: Transflow::FlowDSL Private
- Inherits:
-
Object
- Object
- Transflow::FlowDSL
- Defined in:
- lib/transflow/flow_dsl.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #container ⇒ Object readonly private
- #options ⇒ Object readonly private
- #step_map ⇒ Object readonly private
Instance Method Summary collapse
- #call ⇒ Object private
-
#initialize(options, &block) ⇒ FlowDSL
constructor
private
A new instance of FlowDSL.
- #step(name, options = {}, &block) ⇒ Object private
- #steps(*names) ⇒ Object private
Constructor Details
#initialize(options, &block) ⇒ FlowDSL
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of FlowDSL.
17 18 19 20 21 22 |
# File 'lib/transflow/flow_dsl.rb', line 17 def initialize(, &block) @options = @container = .fetch(:container) @step_map = {} instance_exec(&block) end |
Instance Attribute Details
#container ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/transflow/flow_dsl.rb', line 11 def container @container end |
#options ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/transflow/flow_dsl.rb', line 8 def @options end |
#step_map ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'lib/transflow/flow_dsl.rb', line 14 def step_map @step_map end |
Instance Method Details
#call ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
35 36 37 |
# File 'lib/transflow/flow_dsl.rb', line 35 def call Transaction.new(step_map) end |
#step(name, options = {}, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 |
# File 'lib/transflow/flow_dsl.rb', line 30 def step(name, = {}, &block) StepDSL.new(name, , container, step_map, &block).call end |
#steps(*names) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 |
# File 'lib/transflow/flow_dsl.rb', line 25 def steps(*names) names.reverse_each { |name| step(name) } end |