Sha256: d239ad0166d5c5351fbe0524e3adcee7ff7505e650dc73d47538f288c90bb02e
Contents?: true
Size: 583 Bytes
Versions: 1
Compression:
Stored size: 583 Bytes
Contents
#!/usr/bin/ruby $:.unshift( "../lib" ); require "graphviz" hello_world = GraphViz::new( "" ) hello = hello_world.add_node("Hello") world = hello_world.add_node("World") hello_world.add_edge(hello, world) # final_graph = GraphViz.parse_string( hello_world.output( :dot => String ) ) # final_graph.each_node do |_, node| # puts "Node #{node.id} : position = #{node[:pos]}" # end hello_world = hello_world.complete hello_world.each_node do |_, node| puts "Node #{node.id} : position = " ; p node[:pos].point end puts "---------" puts hello_world.output( :dot => String )
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-graphviz-1.0.1 | examples/sample62.rb |