Parent

Methods

Class/Module Index [+]

Quicksearch

RKelly::Visitors::DotVisitor::Node

Constants

ESCAPE

Public Instance Methods

to_s() click to toggle source
# File lib/rkelly/visitors/dot_visitor.rb, line 6
def to_s
  counter = 0
  label = fields.map { |f|
    s = "<f#{counter}> #{f.to_s.gsub(ESCAPE, '\\\\\1').gsub(/[\r\n]/,' ')}"
    counter += 1
    s
  }.join('|')
  "\"#{node_id}\" [\nlabel = \"#{label}\"\nshape = \"record\"\n];"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.