File: sample73.rb

package info (click to toggle)
ruby-graphviz 1.2.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,216 kB
  • sloc: ruby: 7,685; xml: 26; makefile: 17
file content (18 lines) | stat: -rw-r--r-- 452 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/ruby

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

g = nil
if ARGV[0]
  g = GraphViz::new( "G", :path => ARGV[0] )
else
  g = GraphViz::new( "G" )
end

g.add_nodes "HtmlOne", label: '<<b>This</b> is an<br/>HTML Node>'
g.add_nodes "HtmlTwo", label: '<This is also<br/>an HTML node>'
g.add_nodes "NotHtmlOne", label: '<this is not an HTML node>'
g.add_nodes "NotHtmlTwo", label: 'this is not an HTML node, too!'

g.output( :png => "#{$0}.png" )