Class: Twb::Util::Graphedges

Inherits:
Object
  • Object
show all
Defined in:
lib/twb/util/graphedges.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root = nil) ⇒ Graphedges

Returns a new instance of Graphedges.


26
27
28
29
# File 'lib/twb/util/graphedges.rb', line 26

def initialize (root = nil)
  @root        = root if root.instance_of? Twb::Util::Graphnode
  @edges       = []
end

Instance Attribute Details

#edgesObject

Returns the value of attribute edges


24
25
26
# File 'lib/twb/util/graphedges.rb', line 24

def edges
  @edges
end

#rootObject (readonly)

Returns the value of attribute root


23
24
25
# File 'lib/twb/util/graphedges.rb', line 23

def root
  @root
end

Instance Method Details

#to_sObject


31
32
33
# File 'lib/twb/util/graphedges.rb', line 31

def to_s
  "Root:'%s'  edges::%s::" % [@root.to_s, @edges.to_s]
end