Add object type notation to ruby hash.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
LICENSE
README.md
habject.gemspec
init.rb

README.md

HABJECT

Habject gives you object flavor syntax on ruby Hash.

Installation

Install it with rubygems:

gem install habject

With bundler, add it to your Gemfile:

gem "habject", "~>0.1"

Usage

Let's say we have this hash :

user = {'name' => 'chatgris'}

Habject gives you the possibility to call 'name' on 'user' :

user.name
# => "chatgris"

And also respond_to on user

user.respond_to? :name
# => true

Copyright

See LICENSE for further details.