Class: Flows::SharedContextPipeline::Step Private
- Inherits:
-
Struct
- Object
- Struct
- Flows::SharedContextPipeline::Step
- Defined in:
- lib/flows/shared_context_pipeline/step.rb
Overview
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.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#name ⇒ Object
Returns the value of attribute name.
-
#next_step ⇒ Object
Returns the value of attribute next_step.
-
#router_def ⇒ Object
Returns the value of attribute router_def.
Instance Method Summary collapse
-
#initialize(name:, body: nil, **rest) ⇒ Step
constructor
private
:reek:ManualDispatch.
- #to_node(pipeline_class) ⇒ Object private
Constructor Details
#initialize(name:, body: nil, **rest) ⇒ Step
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.
:reek:ManualDispatch
8 9 10 11 12 13 14 15 |
# File 'lib/flows/shared_context_pipeline/step.rb', line 8 def initialize(name:, body: nil, **rest) if name.respond_to?(:call) body = name name = "#{body}+Step-Object-ID-#{object_id}" end super(name: name, body: body, **rest) end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
6 7 8 |
# File 'lib/flows/shared_context_pipeline/step.rb', line 6 def body @body end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/flows/shared_context_pipeline/step.rb', line 6 def name @name end |
#next_step ⇒ Object
Returns the value of attribute next_step
6 7 8 |
# File 'lib/flows/shared_context_pipeline/step.rb', line 6 def next_step @next_step end |
#router_def ⇒ Object
Returns the value of attribute router_def
6 7 8 |
# File 'lib/flows/shared_context_pipeline/step.rb', line 6 def router_def @router_def end |
Instance Method Details
#to_node(pipeline_class) ⇒ 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.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/flows/shared_context_pipeline/step.rb', line 17 def to_node(pipeline_class) klass = self.class Flows::Flow::Node.new( body: body || pipeline_class.method(name), router: router_def.to_router(next_step), meta: { name: name }, preprocessor: klass::NODE_PREPROCESSOR, postprocessor: klass::NODE_POSTPROCESSOR ) end |