Sha256: 26892a9a603043d09fe45f2182531a6f8076872f6f027ee7bfa6838b1abd2a73

Contents?: true

Size: 296 Bytes

Versions: 28

Compression:

Stored size: 296 Bytes

Contents

# ********** Copyright 2016 Viacom, Inc. Apache 2.0 **********

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
  def deep_dup
    Marshal.load(Marshal.dump(self))
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
roku_builder-4.16.1 lib/roku_builder/hash.rb
roku_builder-4.15.2 lib/roku_builder/hash.rb
roku_builder-4.15.1 lib/roku_builder/hash.rb
roku_builder-4.15.0 lib/roku_builder/hash.rb
roku_builder-4.14.1 lib/roku_builder/hash.rb
roku_builder-4.14.0 lib/roku_builder/hash.rb
roku_builder-4.12.3 lib/roku_builder/hash.rb
roku_builder-4.13.0 lib/roku_builder/hash.rb
roku_builder-4.12.2 lib/roku_builder/hash.rb
roku_builder-4.12.1 lib/roku_builder/hash.rb
roku_builder-4.12.0 lib/roku_builder/hash.rb
roku_builder-4.11.5 lib/roku_builder/hash.rb
roku_builder-4.11.4 lib/roku_builder/hash.rb
roku_builder-4.11.3 lib/roku_builder/hash.rb
roku_builder-4.11.2 lib/roku_builder/hash.rb
roku_builder-4.11.1 lib/roku_builder/hash.rb
roku_builder-4.11.0 lib/roku_builder/hash.rb
roku_builder-4.10.1 lib/roku_builder/hash.rb
roku_builder-4.10.0 lib/roku_builder/hash.rb
roku_builder-4.9.5 lib/roku_builder/hash.rb