Class: Hash

Inherits:
Object show all
Defined in:
lib/stretto/util/utils.rb

Instance Method Summary collapse

Instance Method Details

#except(*keys) ⇒ Object

As taken from ActiveSupport::CoreExtensions::Hash::Except



32
33
34
# File 'lib/stretto/util/utils.rb', line 32

def except(*keys)
  clone.except!(*keys)
end

#except!(*keys) ⇒ Object



36
37
38
39
40
# File 'lib/stretto/util/utils.rb', line 36

def except!(*keys)
  keys.map! { |key| convert_key(key) } if respond_to?(:convert_key)
  keys.each { |key| delete(key) }
  self
end