examples/sample36.rb in ruby-graphviz-1.0.2 vs examples/sample36.rb in ruby-graphviz-1.0.3
- old
+ new
@@ -11,25 +11,25 @@
# New_Line
new_line = []
c = g.subgraph( :rank => "same" )
100.times do |i|
- current_node = c.add_node( "N#{node_number}", :shape => "point", :label => "" )
+ current_node = c.add_nodes( "N#{node_number}", :shape => "point", :label => "" )
last_node = new_line[-1]
unless last_node.nil?
- c.add_edge( last_node, current_node )
+ c.add_edges( last_node, current_node )
end
new_line << current_node
top_first_node = last_line.shift
unless top_first_node.nil?
- g.add_edge( top_first_node, current_node )
+ g.add_edges( top_first_node, current_node )
top_second_node = last_line.shift
unless top_second_node.nil?
- g.add_edge( top_second_node, current_node )
+ g.add_edges( top_second_node, current_node )
last_line.unshift( top_second_node )
end
end
node_number = node_number + 1
end
last_line = new_line
end
-}.output( :png => "#{$0}.png" )
\ No newline at end of file
+}.output( :png => "#{$0}.png" )