From: dblack@... Date: 2006-04-11T01:31:16+09:00 Subject: Re: Adding in class attribute with a Module Hi -- On Tue, 11 Apr 2006, James Britt wrote: > dblack@wobblini.net wrote: >> Hi -- >> >> On Mon, 10 Apr 2006, Austin Ziegler wrote: >> >>> On 4/10/06, kris wrote: >>> >>>> PS. I didnt write cattr_accessor. I'm using Rails but I dont think it is >>>> opart of that? >>> >>> >>> cattr_accessor is a Railsism. It is not part of standard Ruby. >>> >>> I'm undecided whether it should be or not, but it is potentially very >>> useful. >> >> >> If it ever is, I think it needs a new name. It's a wrapper for class >> variables, but class variables, in my view, are not really suitable >> for implementing "attributes", because they are not uniquely >> associated with one object. > > But isn't a class an instance of Class? Of course, but class variables aren't per-class, so using them to implement "attributes" of a class object doesn't make sense. David -- David A. Black (dblack@wobblini.net) Ruby Power and Light, LLC (http://www.rubypowerandlight.com) "Ruby for Rails" coming in PDF April 15, and in paper May 1! http://www.manning.com/black