Sha256: 240b43c6e75b0b1943506c10b8325d1b02b8eff6c6d0c69ee2f18af78f98dbbd

Contents?: true

Size: 264 Bytes

Versions: 16

Compression:

Stored size: 264 Bytes

Contents

# Stolen shamelessly from here 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

16 entries across 16 versions & 1 rubygems

Version Path
cloudster-2.17.0 lib/cloudster/deep_merge.rb
cloudster-2.16.0 lib/cloudster/deep_merge.rb
cloudster-2.15.0 lib/cloudster/deep_merge.rb
cloudster-2.14.1 lib/cloudster/deep_merge.rb
cloudster-2.14.0 lib/cloudster/deep_merge.rb
cloudster-2.13.1 lib/cloudster/deep_merge.rb
cloudster-2.13.0 lib/cloudster/deep_merge.rb
cloudster-2.12.0 lib/cloudster/deep_merge.rb
cloudster-2.11.0 lib/cloudster/deep_merge.rb
cloudster-2.10.0 lib/cloudster/deep_merge.rb
cloudster-2.9.0 lib/cloudster/deep_merge.rb
cloudster-2.8.0 lib/cloudster/deep_merge.rb
cloudster-2.7.0 lib/cloudster/deep_merge.rb
cloudster-2.6.1 lib/cloudster/deep_merge.rb
cloudster-2.6.0 lib/cloudster/deep_merge.rb
cloudster-2.5.0 lib/cloudster/deep_merge.rb