Sha256: c6e0bfd722ccab1a5423f440784e1abb34b55da8ec8d488a34398fd468ed0d18
Contents?: true
Size: 499 Bytes
Versions: 34
Compression:
Stored size: 499 Bytes
Contents
# Copyright (c) 2010-2017 GoodData Corporation. All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. module HashExtensions refine Hash do def deep_merge(hash) hash = hash.to_hash merge(hash) do |_key, old_val, new_val| if old_val.is_a?(Hash) && new_val.is_a?(Hash) old_val.deep_merge(new_val) else new_val end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems