Skip to content

gregwebs/ruby-hash-extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

includes
- required_key(key, error_message = nil)
- required_keys(*keys)
- required_key!(key, error_message = nil)
- assert_required_keys(*required_keys) 
- assert_only_keys(*only_keys)
- dup_values(&default_proc)
- class HashOfArrays


HashOfArrays
accesing a value with the bracket notation will always return an array

ha = HashOfArrays.new(:foo => 'bar', :arr => [1,2])
ha[:foo] # => ['bar']
ha[:arr] # => [1,2]

About

A ruby hash in which every value returned is an Array.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages