class Orchestrate::Graph

Manages graph relationships for a KeyValue item.

Public Class Methods

new(kv_item) click to toggle source

Instantiates a new Graph manager. @param kv_item [Orchestrate::KeyValue] The KeyValue item on the starting end of the graph.

# File lib/orchestrate/graph.rb, line 8
def initialize(kv_item)
  @kv_item = kv_item
  @types = {}
end

Public Instance Methods

[](relation_type) click to toggle source

Accessor for graph relation types. @return [RelationStem]

# File lib/orchestrate/graph.rb, line 15
def [](relation_type)
  @types[relation_type.to_s] || RelationStem.new(@kv_item, relation_type.to_s)
end