Class: ActionDispatch::Journey::Visitors::Dot
- Inherits:
-
FunctionalVisitor
- Object
- FunctionalVisitor
- ActionDispatch::Journey::Visitors::Dot
- Defined in:
- lib/action_dispatch/journey/visitors.rb
Overview
:nodoc:
Constant Summary
Constants inherited from FunctionalVisitor
FunctionalVisitor::DISPATCH_CACHE
Instance Method Summary collapse
- #accept(node, seed = [[], []]) ⇒ Object
-
#initialize ⇒ Dot
constructor
A new instance of Dot.
Methods inherited from FunctionalVisitor
#visit, #visit_DOT, #visit_LITERAL, #visit_SLASH, #visit_SYMBOL
Constructor Details
#initialize ⇒ Dot
Returns a new instance of Dot.
194 195 196 197 |
# File 'lib/action_dispatch/journey/visitors.rb', line 194 def initialize @nodes = [] @edges = [] end |
Instance Method Details
#accept(node, seed = [[], []]) ⇒ Object
199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/action_dispatch/journey/visitors.rb', line 199 def accept(node, seed = [[], []]) super nodes, edges = seed <<-eodot digraph parse_tree { size="8,5" node [shape = none]; edge [dir = none]; #{nodes.join "\n"} #{edges.join("\n")} } eodot end |