Sha256: e1c23a10f48125bdb18bb9508701dba5b678ae49426f9b1b9f1b34039f40f746

Contents?: true

Size: 757 Bytes

Versions: 17

Compression:

Stored size: 757 Bytes

Contents

#!/usr/bin/ruby

$:.unshift( "../lib" )
require "graphviz"

g = nil
if ARGV[0]
  g = GraphViz::new( "G", :path => ARGV[0] )
else
  g = GraphViz::new( "G" )
end

main        = g.add_node( "main" )
parse       = g.add_node( "parse" )
execute     = g.add_node( "execute" )
init        = g.add_node( "init" )
cleanup     = g.add_node( "cleanup" )
make_string = g.add_node( "make_string" )
printf      = g.add_node( "printf" )
compare     = g.add_node( "compare" )

g.add_edge( main, parse )
g.add_edge( parse, execute )
g.add_edge( main, init )
g.add_edge( main, cleanup )
g.add_edge( execute, make_string )
g.add_edge( execute, printf )
g.add_edge( init, make_string )
g.add_edge( main, printf )
g.add_edge( execute, compare )

g.output( :png => "#{$0}.png" )

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ruby-graphviz-1.0.2 examples/sample01.rb
ruby-graphviz-1.0.1 examples/sample01.rb
ruby-graphviz-1.0.0 examples/sample01.rb
ruby-graphviz-0.9.21 examples/sample01.rb
ruby-graphviz-0.9.20 examples/sample01.rb
ruby-graphviz-0.9.19 examples/sample01.rb
ruby-graphviz-0.9.18 examples/sample01.rb
ruby-graphviz-0.9.17 examples/sample01.rb
ruby-graphviz-0.9.16 examples/sample01.rb
ruby-graphviz-0.9.15 examples/sample01.rb
ruby-graphviz-0.9.14 examples/sample01.rb
ruby-graphviz-0.9.13 examples/sample01.rb
ruby-graphviz-0.9.12 examples/sample01.rb
ruby-graphviz-0.9.11 examples/sample01.rb
ruby-graphviz-0.9.10 examples/sample01.rb
ruby-graphviz-0.9.9 examples/sample01.rb
ruby-graphviz-0.9.8 examples/sample01.rb