HI --

On Fri, 13 Oct 2006, jyzhang wrote:

> attr_accessor defines both a writer and a reader
>
> cattr_* is for class variables... you know... the kind that looks like
> @@var

Ruby doesn't have any cattr_* methods, though.  Also, if you write a
wrapper around class variables, it would be better to call them
something else, as the "attr" in "cattr" implies that you're dealing
with an object attribute.  Since class variables are shared by many
objects, they're not actually representing attributes.


David

-- 
                   David A. Black | dblack / wobblini.net
Author of "Ruby for Rails"   [1] | Ruby/Rails training & consultancy [3]
DABlog (DAB's Weblog)        [2] | Co-director, Ruby Central, Inc.   [4]
[1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com
[2] http://dablog.rubypal.com    | [4] http://www.rubycentral.org