method
to_dot
v7.0.0 -
Show latest stable
- Class:
ActionDispatch::Journey::NFA::Dot
to_dot()public
No documentation available.
# File actionpack/lib/action_dispatch/journey/nfa/dot.rb, line 7
def to_dot
edges = transitions.map { |from, sym, to|
" #{from} -> #{to} [label=\"#{sym || 'ε'}\"];"
}
digraph nfa { rankdir=LR; node [shape = doublecircle]; #{accepting_states.join ' '}; node [shape = circle];#{edges.join "\n"}}
end