From: Dave Burt Date: 2005-04-30T09:04:28+09:00 Subject: Re: advice requested / attributes.rb "Ara.T.Howard" asked: > > class A > class_attributes %w( x y z ) > x 4 > y 1 > z 1 > end > > class B < A > y 2 > end > > so, as you can see these class attributes are 'inherited' instance values. > this is done using class instance vars and a search up the ancestors list > if an > attribute has not been set (defined?) in a class. > > questions : > > - does this sit o.k. with people : does it violate pols? i think it's > quite > natural but that's me ;-) POLS belongs to Matz, doesn't it? :) > - what do i call it? for now i'm calling it an class 'inherited' > variable > since it's not really a class instance (@) var nor a hierarchy (@@) > var. I don't see that it's clear that these are not @@ variables - wouldn't that be the obvious implementation for that behaviour, and for something called "class attributes"? Cheers, Dave