HashEx::JsObject- JavaScript-Object-like hash.HashEx::Base- Abstract base class.
Add this line to your application's Gemfile:
gem 'HashEx'And then execute:
$ bundle
Or install it yourself as:
$ gem install HashEx
Just override HashEx::Base#convert_key to create your own one
It works like JS Object. For an instance h:
h[:key],h['key']andh.keyare equal.h.a = { foo: { bar: { baz: 123} } }will convertHashtoHashEx::JsObjectrecursively.h.a.fooandh.a.foo.barwill be instances ofHashEx::JsObject.
Bug reports and pull requests are welcome on GitHub at https://github.com/eGust/HashEx.
The gem is available as open source under the terms of the MIT License.