From: "Darryl L. Pierce" Date: 2011-10-05T02:10:18+09:00 Subject: Re: Local vs method vs instance On 10/04/2011 11:42 AM, Chris Hulan wrote: > My understanding (probly flawed) is > attr_reader :x > > generates the following code: > > def x > @x > end > > so in bar that 'x' is a call to the x method, which returns the '@x' value > but doing it this way makes the x public readable, so should only be > used if that is needed > I'd stick with using @x AH! That's what I missing, and what he meant by "the method". Okay. The OP though didn't have the attr_accessor on the fields, though, that I remember. -- Darryl L. Pierce http://mcpierce.multiply.com/ "What do you care what people think, Mr. Feynman?"