Class: Servitor::ServiceGraph

Inherits:
Object
  • Object
show all
Defined in:
lib/service/service_graph/service_graph.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeServiceGraph

Returns a new instance of ServiceGraph.



10
11
12
# File 'lib/service/service_graph/service_graph.rb', line 10

def initialize
  @service_nodes = { }
end

Instance Attribute Details

#rootObject (readonly)

Returns the value of attribute root.



8
9
10
# File 'lib/service/service_graph/service_graph.rb', line 8

def root
  @root
end

#service_nodesObject (readonly)

Returns the value of attribute service_nodes.



8
9
10
# File 'lib/service/service_graph/service_graph.rb', line 8

def service_nodes
  @service_nodes
end

Class Method Details

.build(root_service_definition) ⇒ Object

Takes a service definition and builds a graph of service definitions, returning the root node for that graph



16
17
18
# File 'lib/service/service_graph/service_graph.rb', line 16

def self.build(root_service_definition)
  new.tap { |g| g.send(:build, root_service_definition) }
end