Class: Pair

Inherits:
Object show all
Defined in:
lib/moon/packages/std/ptree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value) ⇒ Pair

Returns a new instance of Pair.


5
6
7
# File 'lib/moon/packages/std/ptree.rb', line 5

def initialize(key, value)
  @key, @value = key, value
end

Instance Attribute Details

#keyObject

Returns the value of attribute key


2
3
4
# File 'lib/moon/packages/std/ptree.rb', line 2

def key
  @key
end

#valueObject

Returns the value of attribute value


3
4
5
# File 'lib/moon/packages/std/ptree.rb', line 3

def value
  @value
end