Skip to content

pote/hashdot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hashdot - cozy hash accessors.

Hashdot provides a nicer way to access stuff in your hashes, if you've ever done JavaScript, Lua or countless others you'll be familiar with it.

Note: This is a terrible monkeypatch of the Hash class, I would advise against using it in large production systems, I wrote it because I find it comfortable to write in this style smaller scripts. Consider yourself warned. ¯_(ツ)_/¯

require 'hashdot'

hash = {
  :symbol_key   => 1,
  "string_key"  => 2
}

hash.symbol_key #=> 1
hash.string_key #=> 2

That's pretty much it.

Running tests

$ make test

About

Cozy Hash Accessors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published