Sha256: 7ad1f7f724763fdd906a70e823ff2dde87c6e114c867a9d7f139a708264dcdfe
Contents?: true
Size: 354 Bytes
Versions: 1
Compression:
Stored size: 354 Bytes
Contents
# Comes from Rails : http://apidock.com/rails/Hash/deep_merge! class Hash def inner_merge(other_hash) other_hash.each_pair do |k,v| tv = self[k] self[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? tv.inner_merge(v) : v end self end def delete_nil delete_if{|k, v| v.nil? or v.instance_of?(Hash) && v.delete_nil.nil? } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cloudster-2.20.0 | lib/cloudster/hash_additions.rb |