Sha256: e9462c7d2e5f42c6d62f5faf90b3a7b0c10e71a5489a6b563f2778a52f1efcb5
Contents?: true
Size: 357 Bytes
Versions: 2
Compression:
Stored size: 357 Bytes
Contents
module Akami module HashHelper # Returns a new Hash with +hash+ and +other_hash+ merged recursively. # Modifies +hash+ in place. def self.deep_merge!(hash, other_hash) other_hash.each_pair do |k,v| tv = hash[k] hash[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? deep_merge!(tv.dup, v) : v end hash end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
akami-1.3.3 | lib/akami/hash_helper.rb |
akami-1.3.2 | lib/akami/hash_helper.rb |