Sha256: 491d30f71071cd217535191fa1bc12d21588e48a6831cf8df27ce76a28cbc854
Contents?: true
Size: 397 Bytes
Versions: 3
Compression:
Stored size: 397 Bytes
Contents
module DmAdapterSimpledb module Utils def transform_hash(original, options={}, &block) original.inject({}){|result, (key,value)| value = if (options[:deep] && Hash === value) transform_hash(value, options, &block) else value end block.call(result,key,value) result } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dm-adapter-simpledb-1.3.0 | lib/dm-adapter-simpledb/utils.rb |
dm-adapter-simpledb-1.2.0 | lib/dm-adapter-simpledb/utils.rb |
dm-adapter-simpledb-1.1.0 | lib/dm-adapter-simpledb/utils.rb |