From: jim@... Date: 2004-11-12T03:52:49+09:00 Subject: Re: ruby idiom for attribute definition? * Dave Thomas [2004-11-11 13:40:43 +0900]: > You could also say > > class Thing < Struct.new(...) > This got me thinking, so I tried the following: class A < Struct.new(:a) def peek puts @a end end A.new.peek Turns out that this does not work since @a is NOT defined. Problem is, I can't see any instance variables defined inside a struct. Where does it keep the data? -- Jim Freeze