subgraph element is the same to graph, but has another header in dot notation
# File rdoc/dot/dot.rb, line 198
def << ( thing )
@nodes << thing
end
# File rdoc/dot/dot.rb, line 194
def each_node
@nodes.each{ |i| yield i }
end
# File rdoc/dot/dot.rb, line 202
def push( thing )
@nodes.push( thing )
end
# File rdoc/dot/dot.rb, line 210
def to_s( t = '' )
hdr = t + "#{@dot_string} #{@name} {\n"
options = @options.to_a.collect{ |name, val|
val && name != 'label' ?
t + $tab + "#{name} = #{val}" :
name ? t + $tab + "#{name} = \"#{val}\"" : nil
}.compact.join( "\n" ) + "\n"
nodes = @nodes.collect{ |i|
i.to_s( t + $tab )
}.join( "\n" ) + "\n"
hdr + options + nodes + t + "}\n"
end