Module: Parslet::Graphable

Included in:
Parser
Defined in:
lib/parslet/graphviz.rb

Instance Method Summary collapse

Instance Method Details

#graph(opts) ⇒ Object



84
85
86
87
88
89
90
91
# File 'lib/parslet/graphviz.rb', line 84

def graph opts
  g = GraphViz.new(:G, type: :digraph)
  visitor = GraphvizVisitor.new(g)

  new.accept(visitor)

  g.output opts
end