Method: Hash#delete_with_value

Defined in:
lib/fat_core/hash.rb

#delete_with_value(v) ⇒ Object

Remove from the hash all keys that have values == to given value or that include the given value if the hash has an Enumerable for a value

[View source]

16
17
18
19
20
21
# File 'lib/fat_core/hash.rb', line 16

def delete_with_value(v)
  keys_with_value(v).each do |k|
    delete(k)
  end
  self
end