Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced ObjectifiedHash with Hashie #34

Closed
wants to merge 2 commits into from
Closed

Enhanced ObjectifiedHash with Hashie #34

wants to merge 2 commits into from

Conversation

docwhat
Copy link

@docwhat docwhat commented Mar 12, 2014

This should make the ObjectifiedHash behave in a more regular fashion.
Some examples:

  • objhash['name'] == objhash[:name] == objhash.name
  • objhash.name? is true if the value of objhash[:name] is truthy.
  • objhash.keys returns the list of keys on the hash.

In addition, there are now tests for ObjectifiedHash.

docwhat added 2 commits March 12, 2014 19:56
This should make the `ObjectifiedHash` behave in a more
regular fashion.  Some examples:

* `objhash['name'] == objhash[:name] == objhash.name`
* `objhash.name?` is `true` if the value of `objhash[:name]` is truthy.
* `objhash.keys` returns the list of keys on the hash.

In addition, there are now tests for `ObjectifiedHash`.
@NARKOZ
Copy link
Owner

NARKOZ commented Apr 9, 2014

I don't want to add additional dependency (see #3). This adds unnecessary complexity to the code.
If you really need some manipulations with ObjectifiedHash you can access original hash by calling #to_hash and do whatever you want with it. Available since 45b0b9f.

@NARKOZ NARKOZ closed this Apr 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants