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
- #step_options ⇒ Object readonly private
Instance Method Summary collapse
- #call ⇒ Object private
-
#initialize(options, &block) ⇒ FlowDSL
constructor
private
A new instance of FlowDSL.
- #monadic(value) ⇒ Object
- #publish(value) ⇒ Object
- #step(name, options = {}, &block) ⇒ Object
- #steps(*names) ⇒ Object
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.
20 21 22 23 24 25 26 |
# File 'lib/transflow/flow_dsl.rb', line 20 def initialize(, &block) @options = @container = .fetch(:container) @step_map = {} @step_options = {} 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 |
#step_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.
17 18 19 |
# File 'lib/transflow/flow_dsl.rb', line 17 def @step_options 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.
49 50 51 |
# File 'lib/transflow/flow_dsl.rb', line 49 def call Transaction.new(step_map) end |
#monadic(value) ⇒ Object
39 40 41 |
# File 'lib/transflow/flow_dsl.rb', line 39 def monadic(value) .update(monadic: value) end |
#publish(value) ⇒ Object
44 45 46 |
# File 'lib/transflow/flow_dsl.rb', line 44 def publish(value) .update(publish: value) end |
#step(name, options = {}, &block) ⇒ Object
34 35 36 |
# File 'lib/transflow/flow_dsl.rb', line 34 def step(name, = {}, &block) StepDSL.new(name, .merge(), container, step_map, &block).call end |
#steps(*names) ⇒ Object
29 30 31 |
# File 'lib/transflow/flow_dsl.rb', line 29 def steps(*names) names.reverse_each { |name| step(name) } end |