Class: Flows::SharedContextPipeline::Track Private
- Inherits:
-
Object
- Object
- Flows::SharedContextPipeline::Track
- Defined in:
- lib/flows/shared_context_pipeline/track.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.
Constant Summary collapse
- TRACK_ENTRY_ROUTER_DEF =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
RouterDefinition.new( Flows::Result::Ok => :next, Flows::Result::Err => :end )
Instance Method Summary collapse
- #add_step(step) ⇒ Object private
- #empty? ⇒ Boolean private
- #first_step_name ⇒ Object private
-
#initialize(name) ⇒ Track
constructor
private
A new instance of Track.
- #initialize_dup(_other) ⇒ Object private
- #to_node_map(method_source) ⇒ Object private
Constructor Details
#initialize(name) ⇒ Track
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 Track.
10 11 12 13 |
# File 'lib/flows/shared_context_pipeline/track.rb', line 10 def initialize(name) @name = name @step_list = [] end |
Instance Method Details
#add_step(step) ⇒ 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.
19 20 21 22 23 24 25 26 |
# File 'lib/flows/shared_context_pipeline/track.rb', line 19 def add_step(step) last_step = @step_list.last last_step.next_step = step.name if last_step @step_list << step self end |
#empty? ⇒ Boolean
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.
32 33 34 |
# File 'lib/flows/shared_context_pipeline/track.rb', line 32 def empty? @step_list.empty? end |
#first_step_name ⇒ 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.
28 29 30 |
# File 'lib/flows/shared_context_pipeline/track.rb', line 28 def first_step_name @step_list.first.name end |
#initialize_dup(_other) ⇒ 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.
15 16 17 |
# File 'lib/flows/shared_context_pipeline/track.rb', line 15 def initialize_dup(_other) @step_list = @step_list.map(&:dup) end |
#to_node_map(method_source) ⇒ 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.
36 37 38 39 40 |
# File 'lib/flows/shared_context_pipeline/track.rb', line 36 def to_node_map(method_source) @step_list.each_with_object(@name => make_track_entry_node) do |step, node_map| node_map[step.name] = step.to_node(method_source) end end |