From: Gary Wright Date: 2007-03-31T04:09:40+09:00 Subject: Re: Is there a library/mechanism for an object/hash hybrid? On Mar 30, 2007, at 2:45 PM, Jan Friedrich wrote: > dtrusty@my-deja.com schrieb: >> Hi, >> >> There are times when I want to store items in a hash, and yet refer >> the items >> using class/object method syntax. >> >> What do you think? > http://ruby-doc.org/stdlib/libdoc/ostruct/rdoc/classes/OpenStruct.html OpenStruct doesn't define access via the indexing method: info = OpenStruct.new info.name = 'Gary' info[:name] # undefined method Gary Wright