Sha256: 613ba5f63e3d74c71de7f862e920617ee35a1bd06d2949cef6995381cf28a6ab
Contents?: true
Size: 526 Bytes
Versions: 13
Compression:
Stored size: 526 Bytes
Contents
module Grape module Extensions class DeepMergeableHash < ::Hash def deep_merge!(other_hash) other_hash.each_pair do |current_key, other_value| this_value = self[current_key] self[current_key] = if this_value.is_a?(::Hash) && other_value.is_a?(::Hash) this_value.deep_merge(other_value) else other_value end end self end end end end
Version data entries
13 entries across 13 versions & 2 rubygems