From: "Jan E." Date: 2012-06-10T05:34:51+09:00 Subject: Re: Class variables and self Mike Glaz wrote in post #1063872: > My question is in the initialize method about the line: > > self.class.total_count += 1 > > what is the purpose of the 'class' in that statement? self.class is (obviously) the class of self, so in this case it's Car. You may actually write Car.total_count, but then you'll get trouble with renaming and inheritance. -- Posted via http://www.ruby-forum.com/.