examples/sample15.rb in ruby-graphviz-1.0.3 vs examples/sample15.rb in ruby-graphviz-1.0.4
- old
+ new
@@ -4,11 +4,11 @@
# see : http://www.graphviz.org/Gallery/undirected/fdpclust.html
$:.unshift( "../lib" );
require "graphviz"
-GraphViz::new( "G", :type => "graph", :use => "fdp" ) { |graph|
+g = GraphViz::new( "G", :type => "graph", :use => "fdp" ) { |graph|
graph.e
graph.clusterA { |cA|
cA.a << cA.b
cA.clusterC { |cC|
cC._c( :label => "C" ) << cC._d( :label => "D" )
@@ -18,6 +18,8 @@
cB.d << cB.f
}
graph.clusterB.d << graph.clusterA.clusterC._d
graph.e << graph.clusterB
graph.clusterA.clusterC << graph.clusterB
-}.output( :path => '/usr/local/bin/', :png => "#{$0}.png" )
\ No newline at end of file
+}
+
+g.output( :path => '/usr/local/bin/', :png => "#{$0}.png" )