From: Andrea Dallera Date: 2010-06-16T18:37:18+09:00 Subject: Re: Getting rid of self --------------010103040904090202090100 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Have you tried it like this? --- def initialize(attributes = nil) super attributes step = 0 national_debt = 0 sum_of_income = 0 sum_of_taxes = 0 sum_of_happiness = 0 sum_of_investments = 0 end --- 'self' is the default receiver inside a method HTH -- Andrea Dallera http://github.com/bolthar/freightrain http://usingimho.wordpress.com Il 16/06/2010 11.31, Ralph Shnelvar ha scritto: > > Consider > > > --- > > def initialize(attributes = nil) > > super attributes > > self.step = 0 > > self.national_debt = 0 > > self.sum_of_income = 0 > > self.sum_of_taxes = 0 > > self.sum_of_happiness = 0 > > self.sum_of_investments = 0 > > self > > end > > --- > > > > Please focus on the repeated use of self. > > > Is there some way to set the, uh, environment so that "self" need not > be repeated? > > > (Joke: Hmm, if you get rid of your self, do you commit suicide?) > > > > --------------010103040904090202090100--