On Wed, Feb 6, 2008 at 10:05 AM, Jari Williamsson <jari.williamsson / mailbox.swipnet.se> wrote: > > The @@my_data syntax seems to attach only to the original class in which > it was defined, not for any subclasses. And the @my_data syntax attach > to each instance. > I am not sure if I understand you. Class variables(@@bar) are available for its children: (in irb) > class Foo > @@foo = "Yeehaaw!" > end > class Bar < Foo > def initialize > puts @@foo > end > end > Bar.new => "Yeehaaw!"