Sha256: ae2eaeda056ed6ea911a84e6ebb6d011d7967e79df29e9531f3e230a33daabcd
Contents?: true
Size: 243 Bytes
Versions: 17
Compression:
Stored size: 243 Bytes
Contents
class Hash def render_from_yield(&block) reduce({}) do |h, entry| k, v = entry h[block.call(k)] = if v.is_a?(Hash) then v.render_from_yield(&block) else block.call(v) end h end end end
Version data entries
17 entries across 17 versions & 1 rubygems