Class: FlowNodes::Flow
Overview
Orchestrates a sequence of connected nodes, managing state and transitions.
Instance Attribute Summary collapse
-
#start_node ⇒ Object
Returns the value of attribute start_node.
Attributes inherited from BaseNode
Instance Method Summary collapse
-
#initialize(start: nil) ⇒ Flow
constructor
A new instance of Flow.
-
#start(node) ⇒ BaseNode
Sets the starting node of the flow.
Methods inherited from BaseNode
#-, #>>, #exec, #initialize_copy, #nxt, #run, #set_params
Constructor Details
#initialize(start: nil) ⇒ Flow
Returns a new instance of Flow.
8 9 10 11 |
# File 'lib/flow_nodes/flow.rb', line 8 def initialize(start: nil) super() @start_node = start end |
Instance Attribute Details
#start_node ⇒ Object
Returns the value of attribute start_node.
6 7 8 |
# File 'lib/flow_nodes/flow.rb', line 6 def start_node @start_node end |
Instance Method Details
#start(node) ⇒ BaseNode
Sets the starting node of the flow.
16 17 18 19 |
# File 'lib/flow_nodes/flow.rb', line 16 def start(node) @start_node = node node end |