Sha256: ad5046fcbba6edf96409a8860a71cd46485d76444a776a85dc64363a4574704c
Contents?: true
Size: 417 Bytes
Versions: 19
Compression:
Stored size: 417 Bytes
Contents
module Timber module Util # @private module Hash extend self def deep_compact(hash) new_hash = {} hash.each do |k, v| v = if v.is_a?(::Hash) deep_compact(v) else v end if v != nil && v != "" && v != {} && v != [] new_hash[k] = v end end new_hash end end end end
Version data entries
19 entries across 19 versions & 1 rubygems