Sha256: ef51015617ddd764510cea156811c8289f23eca7e12daafad90125f53ee234f0
Contents?: true
Size: 276 Bytes
Versions: 18
Compression:
Stored size: 276 Bytes
Contents
module HashExt module Traverse def self.traverse(hash, &block) hash.inject({}) do |h,(k,v)| if Hash === v v = traverse(v,&block) end nk, nv = block.call(k,v) h[nk] = nv unless nk.nil? h end end end end
Version data entries
18 entries across 18 versions & 2 rubygems