Class: ObjectGraph::Node
Instance Attribute Summary collapse
-
#lost_links ⇒ Object
Returns the value of attribute lost_links.
-
#name ⇒ Object
Returns the value of attribute name.
-
#node_id ⇒ Object
Returns the value of attribute node_id.
-
#options ⇒ Object
Returns the value of attribute options.
-
#pointers ⇒ Object
Returns the value of attribute pointers.
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(node_id, name) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(node_id, name) ⇒ Node
Returns a new instance of Node.
435 436 437 438 439 440 441 442 |
# File 'lib/ograph.rb', line 435 def initialize(node_id, name) @node_id = node_id @name = name @values = [] @pointers = Hash.new { |h,k| h[k] = [] } @options = {} @lost_links = [] end |
Instance Attribute Details
#lost_links ⇒ Object
Returns the value of attribute lost_links.
433 434 435 |
# File 'lib/ograph.rb', line 433 def lost_links @lost_links end |
#name ⇒ Object
Returns the value of attribute name.
433 434 435 |
# File 'lib/ograph.rb', line 433 def name @name end |
#node_id ⇒ Object
Returns the value of attribute node_id.
433 434 435 |
# File 'lib/ograph.rb', line 433 def node_id @node_id end |
#options ⇒ Object
Returns the value of attribute options.
433 434 435 |
# File 'lib/ograph.rb', line 433 def @options end |
#pointers ⇒ Object
Returns the value of attribute pointers.
433 434 435 |
# File 'lib/ograph.rb', line 433 def pointers @pointers end |
#values ⇒ Object
Returns the value of attribute values.
433 434 435 |
# File 'lib/ograph.rb', line 433 def values @values end |
Instance Method Details
#<=>(other) ⇒ Object
444 445 446 |
# File 'lib/ograph.rb', line 444 def <=>(other) self.node_id <=> other.node_id end |