File: sample38.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 (12 lines) | stat: -rw-r--r-- 296 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
# coding: utf-8
$:.unshift( "../lib" )
require "graphviz"

g = GraphViz::new( :G ) { |_g|
  _g.a[:label => "ε"]
  _g.add_nodes( "b", :label => "ε" )
  _g.c[:label => 'ε']
  _g.add_nodes( "d", :label => 'ε' )
}

puts g.output( :none => String, :png => "#{$0}.png", :path => "/usr/local/bin" )