Class: Wizardry::Graph
- Inherits:
-
Object
- Object
- Wizardry::Graph
- Defined in:
- lib/wizardry/graph.rb
Instance Attribute Summary collapse
-
#graph ⇒ Object
readonly
Returns the value of attribute graph.
Instance Method Summary collapse
-
#initialize(framework) ⇒ Graph
constructor
A new instance of Graph.
- #to_dot ⇒ Object
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
#graph ⇒ Object (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_dot ⇒ Object
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 |