class KXI::Collections::HashCollection::HashEnumerator::KeyValuePair

Represents a key-value pair

Public Class Methods

new(k, v) click to toggle source

Instantiates the {KXI::Collections::HashCollection::HashEnumerator::KeyValuePair} class @param k [Object] Key of pair @param v [Object] Value of pair

# File lib/kxi/collections/hash_collection.rb, line 91
def initialize(k, v)
        @key = k
        @val = v
end

Public Instance Methods

key() click to toggle source

Returns the key of pair @return [Object] Key of pair

# File lib/kxi/collections/hash_collection.rb, line 78
def key
        @key
end
value() click to toggle source

Returns the value of pair @return [Object] Value of pair

# File lib/kxi/collections/hash_collection.rb, line 84
def value
        @val
end