Class: Servitor::ServiceGraph
- Inherits:
-
Object
- Object
- Servitor::ServiceGraph
- Defined in:
- lib/service/service_graph/service_graph.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
-
#service_nodes ⇒ Object
readonly
Returns the value of attribute service_nodes.
Class Method Summary collapse
-
.build(root_service_definition) ⇒ Object
Takes a service definition and builds a graph of service definitions, returning the root node for that graph.
Instance Method Summary collapse
-
#initialize ⇒ ServiceGraph
constructor
A new instance of ServiceGraph.
Constructor Details
#initialize ⇒ ServiceGraph
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
#root ⇒ Object (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_nodes ⇒ Object (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 |