Class: Hash

Inherits:
Object show all
Defined in:
lib/utility_belt/hash_math.rb

Instance Method Summary collapse

Instance Method Details

#-(other) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/utility_belt/hash_math.rb', line 3

def -(other)
  if other.is_a? Hash
    reject { |k,v| other[k] == v }
  else
    reject { |k,v| k == other }
  end
end