Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/matchcase/hash.rb

Instance Method Summary collapse

Instance Method Details

#===(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


5
6
7
8
9
10
# File 'lib/matchcase/hash.rb', line 5

def ===(other)
  return false unless other.is_a?(Hash)
  all? do |key, item|
    item === other[key]
  end
end