From: John Lam Date: 2006-05-13T01:54:10+09:00 Subject: Inheriting class-based state ------=_Part_29249_10086314.1147452847550 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline This one puzzles me - I know there's something fundamental that I'm not understanding about Ruby's object model. Consider these classes: class Base def self.my_name=3D(value) @my_name =3D value end def self.my_name @my_name end end class Derived < Base; end Base.my_name =3D 'John' puts Base.my_name John Derived.my_name nil Derived.my_name =3D 'Mike' puts Derived.my_name Mike So the class instance member @my_name isn't inherited by the Derived class. How do I share state between a derived class and its base class? Thanks -John http://www.iunknown.com ------=_Part_29249_10086314.1147452847550--