Class: Journey::Visitors::Dot
- Defined in:
- lib/journey/visitors.rb
Constant Summary
Constants inherited from Visitor
Instance Method Summary collapse
- #accept(node) ⇒ Object
-
#initialize ⇒ Dot
constructor
A new instance of Dot.
Constructor Details
#initialize ⇒ Dot
Returns a new instance of Dot.
125 126 127 128 |
# File 'lib/journey/visitors.rb', line 125 def initialize @nodes = [] @edges = [] end |
Instance Method Details
#accept(node) ⇒ Object
130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/journey/visitors.rb', line 130 def accept node super <<-eodot digraph parse_tree { size="8,5" node [shape = none]; edge [dir = none]; #{@nodes.join "\n"} #{@edges.join("\n")} } eodot end |