Class: Hash

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

Instance Method Summary collapse

Instance Method Details

#without(*keys) ⇒ Object



2
3
4
# File 'lib/acts_as_formatted/hash.rb', line 2

def without(*keys)
  inject({}) { |hash, pair| hash[pair.first] = pair.last unless keys.include?(pair.first); hash }
end