From: "Ruth A. Kramer" Date: 2004-12-30T23:41:15+09:00 Subject: Re: Inheritance of class variables Eustaquio Rangel de Oliveira Jr. wrote: > Thanks for your help (my brain is still hot here). My brain is not here either (I'm fighting a headache) and I didn't carefully read the example code, but maybe the following will help (and maybe it's way off base). Ruby allows you to have class variables and instance variables. If you have a class like cars (I didn't read the example closely at all) and instances for Ford, Honda, ..., only one class variable will exist but instance variables will exist for Ford, Honda, .... Thus, if, for example, you want a total over all cars, you (with suitable coding) want to use the class variable. If you want separate totals for Ford, Honda, ..., you want to use instance variables. Going even further out on a limb (I'm a Ruby newbie too (and and if you don't like my ideas, you could say goodbye, Ruby newbie, and even write a song about it)), IIRC, a class variable is prefixed with @@, and something else (maybe instance variables?) are prefixed with @. Randy Kramer