Class: Orchestrate::Graph
- Inherits:
-
Object
- Object
- Orchestrate::Graph
- Defined in:
- lib/orchestrate/graph.rb
Overview
Manages graph relationships for a KeyValue item.
Defined Under Namespace
Classes: RelationStem
Instance Method Summary collapse
-
#[](relation_type) ⇒ RelationStem
Accessor for graph relation types.
-
#initialize(kv_item) ⇒ Graph
constructor
Instantiates a new Graph manager.
Constructor Details
#initialize(kv_item) ⇒ Graph
Instantiates a new Graph manager.
8 9 10 11 |
# File 'lib/orchestrate/graph.rb', line 8 def initialize(kv_item) @kv_item = kv_item @types = {} end |
Instance Method Details
#[](relation_type) ⇒ RelationStem
Accessor for graph relation types.
15 16 17 |
# File 'lib/orchestrate/graph.rb', line 15 def [](relation_type) @types[relation_type.to_s] || RelationStem.new(@kv_item, relation_type.to_s) end |