Method: Hash#without
- Defined in:
- lib/sc-core-ext/hash.rb
#without(*keys) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/sc-core-ext/hash.rb', line 34 def without(*keys) keys.flatten! inject(self.class.new) do |hash, (key, value)| hash[key] = value unless keys.include?(key) hash end end |