Class: GraphAgent::Graph::ConditionalEdge
- Inherits:
-
Object
- Object
- GraphAgent::Graph::ConditionalEdge
- Defined in:
- lib/graph_agent/graph/conditional_edge.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#path_map ⇒ Object
readonly
Returns the value of attribute path_map.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(source, path, path_map: nil) ⇒ ConditionalEdge
constructor
A new instance of ConditionalEdge.
- #resolve(state, config = {}) ⇒ Object
Constructor Details
#initialize(source, path, path_map: nil) ⇒ ConditionalEdge
Returns a new instance of ConditionalEdge.
8 9 10 11 12 |
# File 'lib/graph_agent/graph/conditional_edge.rb', line 8 def initialize(source, path, path_map: nil) @source = source.to_s @path = path @path_map = path_map end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/graph_agent/graph/conditional_edge.rb', line 6 def path @path end |
#path_map ⇒ Object (readonly)
Returns the value of attribute path_map.
6 7 8 |
# File 'lib/graph_agent/graph/conditional_edge.rb', line 6 def path_map @path_map end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
6 7 8 |
# File 'lib/graph_agent/graph/conditional_edge.rb', line 6 def source @source end |
Instance Method Details
#resolve(state, config = {}) ⇒ Object
14 15 16 17 |
# File 'lib/graph_agent/graph/conditional_edge.rb', line 14 def resolve(state, config = {}) result = invoke_path(state, config) _resolve_result(result) end |