class ThomasUtils::KeyIndexer

Attributes

index[R]
key[R]

Public Class Methods

new(key, index) click to toggle source
# File lib/thomas_utils/key_indexer.rb, line 7
def initialize(key, index)
  @key = key
  @index = index
end

Public Instance Methods

==(rhs) click to toggle source
# File lib/thomas_utils/key_indexer.rb, line 16
def ==(rhs)
  rhs.is_a?(KeyIndexer) && key == rhs.key && index == rhs.index
end
Also aliased as: eql?
eql?(rhs)
Alias for: ==
hash() click to toggle source
# File lib/thomas_utils/key_indexer.rb, line 21
def hash
  to_s.hash
end
to_s() click to toggle source
# File lib/thomas_utils/key_indexer.rb, line 12
def to_s
  "#{key}['#{index}']"
end