From: gabriele renzi Date: 2007-09-30T08:45:03+09:00 Subject: Re: Is there a combination of a struct and an array? I wanna iterate over all created objects from a certain struct-class (I guess). On Sun, 30 Sep 2007 00:48:54 +0900, Julian Tarkhanov wrote: > On 29-sep-2007, at 15:40, kazaam wrote: > >> but how to achieve this? any idea or suggestion? > > 1) You parse the thing into a hash > 2) You use a sprinkle of _why's Ruby magick to structify a hash 2b) you use openstruct which does it for you :) >> require 'ostruct' O=> true >> o=OpenStruct.new(:a=>1) => # >> o.a => 1 >> -- goto 10: http://www.goto10.it blog it: http://riffraff.blogsome.com blog en: http://www.riffraff.info