subgraph element is the same to graph, but has another header in dot notation
# File rdoc/dot.rb, line 193
def << ( thing )
@nodes << thing
end
# File rdoc/dot.rb, line 189
def each_node
@nodes.each{ |i| yield i }
end
# File rdoc/dot.rb, line 197
def push( thing )
@nodes.push( thing )
end
# File rdoc/dot.rb, line 205
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
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please see Improve the docs, or visit Documenting-ruby.org.