From: Joseph McDonald Date: 2001-07-10T12:35:04+09:00 Subject: [ruby-talk:17589] Re: perfect newbie HEF> class Foo HEF> @@var1 = nil HEF> @ var2 = nil HEF> def mymeth HEF> @var3 = nil HEF> end HEF> end HEF> Here, note that @@var1 is a class variable, @var3 is an instance variable, HEF> and HEF> @var2 is a class instance variable. @var2 does not belong to any instance of HEF> Foo, nor yet to foo itself, but to the class of Foo, which is Class. HEF> Have I said that wrong and embarassed myself? :) That is how I understand it. What I think would be valuable is for someone to explain *why* klass variables and methods are important, and in what situations you will use them. I have read chap 19 of pickaxe (I need to read it again a couple more times I'm sure...) and it explains the mechanics of what is going on, but I don't yet have a grasp on why/where/when I would create a klass method vs a regular method in a class definition. (sorry if "klass method is not the right terminology). I think I know who's up to the task ;-) -joe