Class: ActionDispatch::Journey::Visitors::Dot

Inherits:
Visitor
  • Object
show all
Defined in:
lib/action_dispatch/journey/visitors.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Visitor

Visitor::DISPATCH_CACHE

Instance Method Summary collapse

Constructor Details

#initializeDot

Returns a new instance of Dot.



154
155
156
157
# File 'lib/action_dispatch/journey/visitors.rb', line 154

def initialize
  @nodes = []
  @edges = []
end

Instance Method Details

#accept(node) ⇒ Object



159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/action_dispatch/journey/visitors.rb', line 159

def accept(node)
  super
  "  digraph parse_tree {\n    size=\"8,5\"\n    node [shape = none];\n    edge [dir = none];\n    \#{@nodes.join \"\\n\"}\n    \#{@edges.join(\"\\n\")}\n  }\n  eodot\nend\n"