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