src_ruby/active_support/core_ext/hash/slice.rb
def slice!(*keys)
    keys.map! { |key| convert_key(key) } if respond_to?(:convert_key, true)
    omit = slice(*self.keys - keys)
    hash = slice(*keys)
    replace(hash)
    omit
  end
# Replaces the hash with only the given keys.
# Returns a hash containing the removed key/value pairs.
#   {:a => 1, :b => 2, :c => 3, :d => 4}.slice!(:a, :b) # => {:c => 3, :d => 4}
Replaces the hash with only the given keys.
Returns a hash containing the removed key/value pairs.
Replaces the hash with only the given keys . Returns a hash containing the removed key / value pairs .
def slice!(*keys)
    keys.map! { |key| convert_key(key) } if respond_to?(:convert_key, true)
    omit = slice(*self.keys - keys)
    hash = slice(*keys)
    replace(hash)
    omit
  end
def slice! ( * keys ) keys . map! { | key | convert_key ( key ) } if respond_to? ( :convert_key , true ) omit = slice ( * self . keys - keys ) hash = slice ( * keys ) replace ( hash ) omit end
Replaces the hash with only the given keys.
Replaces the hash with only the given keys .
keys