123456789_123456789_123456789_123456789_123456789_

Module: ActionDispatch::Journey::NFA::Dot

Do not use. This module is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: actionpack/lib/action_dispatch/journey/nfa/dot.rb

Instance Method Summary

Instance Method Details

#to_dot

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/journey/nfa/dot.rb', line 9

def to_dot
  edges = transitions.map { |from, sym, to|
    "  #{from} -> #{to} [label=\"#{sym || 'ε'}\"];"
  }

  <<-eodot
digraph nfa {
  rankdir=LR;
  node [shape = doublecircle];
  #{accepting_states.join ' '};
  node [shape = circle];
#{edges.join "\n"}
}
  eodot
end