/usr/share/doc/ruby-graphviz/examples/sample33.rb is in ruby-graphviz 1.0.8-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | $:.unshift( "../lib" );
require 'graphviz/family_tree'
tree = GraphViz::FamilyTree.new do
generation do
abraham.is_a_man( "Abraham" )
mona.is_a_woman( "Mona" )
abraham.is_maried_with mona
clancy.is_a_man( "Clancy" )
jackeline.is_a_woman( "Jackeline" )
clancy.is_maried_with jackeline
end
generation do
herb.is_a_man( "Herb" )
homer.is_a_man( "Homer" )
marge.is_a_woman( "Marge" )
patty.is_a_woman( "Patty" )
selma.is_a_woman( "Selma" )
homer.is_maried_with marge
end
couple( abraham, mona ).kids( herb, homer )
couple( clancy, jackeline ).kids( marge, patty, selma )
generation do
bart.is_a_boy( "Bart" )
lisa.is_a_girl( "Lisa" )
maggie.is_a_girl( "Maggie" )
ling.is_a_boy( "Ling" )
end
couple( homer, marge ).kids( bart, lisa, maggie )
ling.kids( selma )
end
puts tree.graph.save( :none => String )
|