Sha256: 397a2422679c44588318e9e4ce70a3c5ae5ff439f7ac3fc0653ec93a97ff6a32

Contents?: true

Size: 267 Bytes

Versions: 8

Compression:

Stored size: 267 Bytes

Contents

# Stolen shamelessly from Rails : http://apidock.com/rails/Hash/deep_merge!
class Hash
  def deep_merge(other_hash)
    other_hash.each_pair do |k,v|
      tv = self[k]
      self[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? tv.deep_merge(v) : v
    end
    self
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cloudster-2.19.6 lib/cloudster/deep_merge.rb
cloudster-2.19.5 lib/cloudster/deep_merge.rb
cloudster-2.19.4 lib/cloudster/deep_merge.rb
cloudster-2.19.3 lib/cloudster/deep_merge.rb
cloudster-2.19.2 lib/cloudster/deep_merge.rb
cloudster-2.19.1 lib/cloudster/deep_merge.rb
cloudster-2.19.0 lib/cloudster/deep_merge.rb
cloudster-2.18.0 lib/cloudster/deep_merge.rb