Method: Hash#without_values
- Defined in:
- lib/sc-core-ext/hash.rb
#without_values(*values) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/sc-core-ext/hash.rb', line 42 def without_values(*values) values.flatten! inject(self.class.new) do |hash, (key, value)| hash[key] = value unless values.include?(value) hash end end |