class YaGraph::SubGraph

Public Class Methods

new() click to toggle source
Calls superclass method YaGraph::Graph::new
# File lib/yagraphlib.rb, line 100
def initialize()
  super()
end

Public Instance Methods

is_cluster() click to toggle source
# File lib/yagraphlib.rb, line 104
def is_cluster() false end
label() click to toggle source
# File lib/yagraphlib.rb, line 114
def label() nil end
to_graphviz(out) click to toggle source
# File lib/yagraphlib.rb, line 106
def to_graphviz(out)
  out.puts("  subgraph #{if is_cluster() then "cluster_" else "" end}#{uid()} {")
  if label() then out.puts("    label=\"#{label()}\"") end
  @nodes.each {|k, n| out.write("  "); n.to_graphviz(out) }
  @edges.each {|k, e| out.write("  "); e.to_graphviz(out) }
  out.puts("  }")
end