Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/disloku/util/Hash.rb

Instance Method Summary collapse

Instance Method Details

#recursive_merge(other) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/disloku/util/Hash.rb', line 3

def recursive_merge(other)
	return merge(other) do |key, oldv, newv|
		if (oldv.kind_of?(Hash) && newv.kind_of?(Hash))
			oldv.recursive_merge(newv)
		else
			newv
		end
	end
end