From: aidy Date: 2007-11-12T19:35:03+09:00 Subject: Re: an attr_* in a constructor? On 11 Nov, 23:28, Rick DeNatale wrote: > On Nov 11, 2007 6:05 PM, aidy wrote: > The attr_* methods are private instance methods in Module, which means > that they are methods for modules and classes. > > the initialize method is an instance method, in this case of the > Whatever class. Try: > > class Whatever > attr_accessor :log > > def initialize > self.log = 'whatever' > # or @log = 'whatever' > end > end > > -- > Rick DeNatale > Thanks Rick, I am having a little trouble with OO at the moment. Aidy