Sha256: bcad38a61ebd63ed7d694c7a8b0135300159ac503a937b67733cbc61ff95c5ee

Contents?: true

Size: 169 Bytes

Versions: 6

Compression:

Stored size: 169 Bytes

Contents

class Hash
  def deep_merge(second)
    merger = proc { |key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : v2 }
    self.merge(second, &merger)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
stencil-0.1.5 lib/stencil/hash.rb
stencil-0.1.4 lib/stencil/hash.rb
stencil-0.1.3 lib/stencil/hash.rb
stencil-0.1.2 lib/stencil/hash.rb
stencil-0.1.1 lib/stencil/hash.rb
stencil-0.1.0 lib/stencil/hash.rb