hashie/hashie

Deep indifferent access

p opened this issue · 1 comments

p commented

I cannot figure out how to get indifferent access to work with nested hashes, the way ActiveSupport does it:

butler% irb -rhashie
irb(main):001:0> class C < Hash
irb(main):002:1> include Hashie::Extensions::IndifferentAccess
irb(main):003:1> end
=> C
irb(main):004:0> c=C.new(a:{'b'=>'c'})
=> {}
irb(main):006:0> c['a'][:b]
=> nil

If this is possible can you please include an example in the readme how to do it.

p commented

My mistake, finally figured out how Hash's constructor works.