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

Inherits:
Visitor show all
Defined in:
actionpack/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.



165
166
167
168
# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 165

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

Instance Method Details

#accept(node) ⇒ Object



170
171
172
173
174
175
176
177
178
179
180
181
# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 170

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