lib/configliere/deep_hash.rb
# Removes the given keys from the hash
# Returns a hash containing the removed key/value pairs
#
# @example
#   hsh = {:a => 1, :b => 2, :c => 3, :d => 4}
#   hsh.extract!(:a, :b)
#   # => {:a => 1, :b => 2}
#   hsh
#   # => {:c => 3, :d =>4}
Removes the given keys from the hash
Returns a hash containing the removed key/value pairs
Removes the given keys from the hash Returns a hash containing the removed key / value pairs
def extract!(*keys)
    result = self.class.new
    keys.each{|key| result[key] = delete(key) }
    result
  end
def extract! ( * keys ) result = self . class . new keys . each { | key | result [ key ] = delete ( key ) } result end
Removes the given keys from the hash
Returns a hash containing the removed key/value pairs
Removes the given keys from the hash Returns a hash containing the removed key / value pairs
keys
example
None