examples/sample46.rb in ruby-graphviz-1.0.2 vs examples/sample46.rb in ruby-graphviz-1.0.3
- old
+ new
@@ -18,26 +18,26 @@
g.edge["label"] = ""
g["size"] = "4,4"
g.node["shape"] = "box"
-main = g.add_node( "main" )
+main = g.add_nodes( "main" )
g.node["shape"] = "ellipse"
-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", "label" => 'make a\nstring' )
-printf = g.add_node( "printf" )
-compare = g.add_node( "compare", "shape" => "box", "style" => "filled", "color" => ".7 .3 1.0" )
+parse = g.add_nodes( "parse" )
+execute = g.add_nodes( "execute" )
+init = g.add_nodes( "init" )
+cleanup = g.add_nodes( "cleanup" )
+make_string = g.add_nodes( "make_string", "label" => 'make a\nstring' )
+printf = g.add_nodes( "printf" )
+compare = g.add_nodes( "compare", "shape" => "box", "style" => "filled", "color" => ".7 .3 1.0" )
-g.add_edge( main, parse, "weight" => "8" )
-g.add_edge( parse, execute )
-g.add_edge( main, init, "style" => "dotted" )
-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, "color" => "red", "style" => "bold", "label" => "100 times" )
-g.add_edge( execute, compare, "color" => "red" )
+g.add_edges( main, parse, "weight" => "8" )
+g.add_edges( parse, execute )
+g.add_edges( main, init, "style" => "dotted" )
+g.add_edges( main, cleanup )
+g.add_edges( execute, make_string )
+g.add_edges( execute, printf )
+g.add_edges( init, make_string )
+g.add_edges( main, printf, "color" => "red", "style" => "bold", "label" => "100 times" )
+g.add_edges( execute, compare, "color" => "red" )
g.output( :png => "#{$0}.png" )