lib/configliere/deep_hash.rb
def slice!(*keys)
    keys = keys.map!{|key| convert_key(key) } if respond_to?(:convert_key)
    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
# @example
#   hsh = {:a => 1, :b => 2, :c => 3, :d => 4}
#   hsh.slice!(:a, :b)
#   # => {:c => 3, :d =>4}
#   hsh
#   # => {:a => 1, :b => 2}
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 = keys.map!{|key| convert_key(key) } if respond_to?(:convert_key)
    omit = slice(*self.keys - keys)
    hash = slice(*keys)
    replace(hash)
    omit
  end
def slice! ( * keys ) keys = keys . map! { | key | convert_key ( key ) } if respond_to? ( :convert_key ) 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
example
None