From: "Peña, Botp" Date: 2007-07-24T11:18:20+09:00 Subject: Re: Variable Generation From: Ari Brown [mailto:ari@aribrown.com] # yes, I mean spontaneously generated variables. you don't like Struct irb(main):006:0> v = Struct.new(:yea, :cool, :awesome, :stuff) => # irb(main):007:0> v1 = v.new("yeah","cool","awesome","stuff") => # yea="yeah", cool="cool", awesome="awesome", stuff="stuff"> irb(main):008:0> v1.yea => "yeah" irb(main):009:0> v1.yea = "heheh" => "heheh" irb(main):010:0> v1.yea => "heheh" irb(main):011:0> v2 = v.new("yeah","cool","awesome","stuff") => # yea="yeah", cool="cool", awesome="awesome", stuff="stuff"> irb(main):012:0> v2.yea => "yeah" you can play w your var groups ... irb(main):014:0> v3 = v1 => # yea="heheh", cool="cool", awesome="awesome", stuff="stuff"> irb(main):015:0> v3.yea => "heheh" but i wish Struct vars or basically ruby's accessors can be initialized, like v = Struct.new(:yea = "yeah!", :cool = "cool", :awesome = "!", :stuff = ":)" ) less repitition ie. kind regards -botp