Sha256: 81f5cc2e463d992da537cdcd7a0cb32eb2a82b6a20bcde8cf06db789ad73611a
Contents?: true
Size: 311 Bytes
Versions: 1
Compression:
Stored size: 311 Bytes
Contents
Adds a to_hash method to arrays to easily convert them to hash. Example: 2.0.0p247 :001 > [].to_hash => {} 2.0.0p247 :002 > [1].to_hash => {1=>nil} 2.0.0p247 :003 > [1,2].to_hash => {1=>2} 2.0.0p247 :004 > [1,2,3,4].to_hash => {1=>2, 3=>4} 2.0.0p247 :005 > [[1,2],[3,4]].to_hash => {1=>2, 3=>4}
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
to-hash-0.0.1 | README.rdoc |