On Monday 21 December 2009 15:01:09 Josef Reidinger wrote:
from my understanding attr_accessor_with_default sets a instance variable on the class object. those are not inherited.
class TestA class << self def test_a "test_a" end end end class TestB < TestA end class TestC class << self attr_accessor_with_default(:test_c) { "test_c" } end end class TestD < TestC end class TestF < TestD end puts TestA.test_a puts TestB.test_a puts TestC.test_c puts TestD.test_c puts TestF.test_c output: test_a test_a test_c test_c test_c -- Duncan Mac-Vicar P. - Engineering Manager, YaST SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-ruby+help@opensuse.org