Class: Xunch::RBTree::ImmutableNode
- Inherits:
-
Object
- Object
- Xunch::RBTree::ImmutableNode
- Defined in:
- lib/xunch/utils/rb_tree_node.rb
Overview
class RBTree::Node
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(key, value) ⇒ ImmutableNode
constructor
A new instance of ImmutableNode.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(key, value) ⇒ ImmutableNode
Returns a new instance of ImmutableNode.
52 53 54 55 |
# File 'lib/xunch/utils/rb_tree_node.rb', line 52 def initialize(key, value) @key = key @value = value end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
49 50 51 |
# File 'lib/xunch/utils/rb_tree_node.rb', line 49 def key @key end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
50 51 52 |
# File 'lib/xunch/utils/rb_tree_node.rb', line 50 def value @value end |
Instance Method Details
#inspect ⇒ Object
57 58 59 |
# File 'lib/xunch/utils/rb_tree_node.rb', line 57 def inspect "#{@key}=#{@value}" end |
#to_s ⇒ Object
61 62 63 |
# File 'lib/xunch/utils/rb_tree_node.rb', line 61 def to_s "#{@key}=#{@value}" end |