fancy-open-struct 0.1.2
FancyOpenStruct is a subclass of OpenStruct, and is a variant of RecursiveOpenStruct. It differs from OpenStruct in that it allows nested hashes to be treated in a recursive fashion, and it also provides Hash methods for getting and setting values. For example: fos = FancyOpenStruct.new({ :a => { :b => 'c' } }) fos.a.b # 'c' fos.foo = 'bar' fos[:foo] # 'bar' fos.length # 2 Also, nested hashes can still be accessed as hashes: fos.a_as_a_hash # { :b => 'c' }