Sha256: 6aa29d717c52908bf9aba6413e609130a3693fa473d00d16be150a269b570074

Contents?: true

Size: 549 Bytes

Versions: 25

Compression:

Stored size: 549 Bytes

Contents

#!/usr/bin/ruby

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

g = GraphViz.parse( "hello.dot", :path => "/usr/local/bin" ) { |g|
  g.graph[:color] = "blue"
  g.node[:color] = "red"
  g.edge[:color] = "yellow"
  g.get_node("Hello") { |n|
    n.label = "Bonjour"
  }
  g.get_node("World") { |n|
    n.label = "Le Monde"
  }
}

g.graph.each do |k, v|
  puts "graph : #{k} => #{v}"
end

g.node.each do |k, v|
  puts "node : #{k} => #{v}"
end

g.edge.each do |k, v|
  puts "edge : #{k} => #{v}"
end

puts "-----------"

puts g.output(:none => String)

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
ruby-graphviz-1.2.5 examples/dot/hello_test.rb
ruby-graphviz-1.2.4 examples/dot/hello_test.rb
ruby-graphviz-1.2.3 examples/dot/hello_test.rb
ruby-graphviz-1.2.2 examples/dot/hello_test.rb
ruby-graphviz-1.2.1 examples/dot/hello_test.rb
ruby-graphviz-1.2.0 examples/dot/hello_test.rb
ruby-graphviz-1.1.0 examples/dot/hello_test.rb
ruby-graphviz_c-1.1.1 examples/dot/hello_test.rb
ruby-graphviz_c-1.1.0 examples/dot/hello_test.rb
ruby-graphviz-1.0.9 examples/dot/hello_test.rb
ruby-graphviz-1.0.8 examples/dot/hello_test.rb
ruby-graphviz-1.0.7 examples/dot/hello_test.rb
ruby-graphviz-1.0.6 examples/dot/hello_test.rb
ruby-graphviz-1.0.5 examples/dot/hello_test.rb
ruby-graphviz-1.0.4 examples/dot/hello_test.rb
ruby-graphviz-1.0.3 examples/dot/hello_test.rb
ruby-graphviz-1.0.2 examples/dot/hello_test.rb
ruby-graphviz-1.0.1 examples/dot/hello_test.rb
ruby-graphviz-1.0.0 examples/dot/hello_test.rb
ruby-graphviz-0.9.21 examples/dot/hello_test.rb