Class: Wizardry::Graph

Inherits:
Object
  • Object
show all
Defined in:
lib/wizardry/graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(framework) ⇒ Graph

Returns a new instance of Graph.



5
6
7
8
# File 'lib/wizardry/graph.rb', line 5

def initialize(framework)
  @framework = framework
  @graph     = reticulate
end

Instance Attribute Details

#graphObject (readonly)

Returns the value of attribute graph.



3
4
5
# File 'lib/wizardry/graph.rb', line 3

def graph
  @graph
end

Instance Method Details

#to_dotObject



10
11
12
13
14
15
16
# File 'lib/wizardry/graph.rb', line 10

def to_dot
  <<~GRAPH
    digraph name {
      #{build_edges.flatten.join(';')};
    }
  GRAPH
end