Skip to content

sujoyg/to-hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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],].to_hash

=> {1=>2, 3=>4}

About

A gem that adds a to_hash method to arrays.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages