Hipsterhash
A completely indifferent Hash.
Installation
Add this line to your application's Gemfile:
gem 'hipsterhash'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hipsterhash
Usage
hh = HipsterHash.new
hh[:foo_bar] = "Pigs"
hh["FooBar"] # => "Pigs"
Performance
A HipsterHash is pretty quick - faster than an OpenStruct (and more, like, sure, man), but not as fast as a Hash. And writing is slow. It's nifty for scenarios like configuration objects that get created once, and accessed many times.
Run the performance.rb script in the test directory for a gander.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request