class TFG::Support::HashWithIndifferentEquality

Public Class Methods

new(hash) click to toggle source
# File lib/tfg/support/hash_with_indifferent_equality.rb, line 4
def initialize(hash)
  @hash = hash
end

Public Instance Methods

==(other) click to toggle source
# File lib/tfg/support/hash_with_indifferent_equality.rb, line 16
def ==(other)
  if other.is_a?(::Hash)
    @hash.with_indifferent_access == other.with_indifferent_access
  else
    @hash == other
  end
end
is_a?(klass) click to toggle source
Calls superclass method
# File lib/tfg/support/hash_with_indifferent_equality.rb, line 8
def is_a?(klass)
  if klass == ::TFG::Support::HashWithIndifferentEquality
    return true
  else
    super
  end
end

Private Instance Methods

method_missing(name, *args, &block) click to toggle source
# File lib/tfg/support/hash_with_indifferent_equality.rb, line 26
def method_missing(name, *args, &block)
  @hash.public_send(name, *args, &block)
end