From: ddet@... (Det) Date: 2002-12-17T18:25:24+09:00 Subject: standard accessor for List attribute Hello everyone, the shortcuts attr_ for creating an instance variable with standard accessor methods is one of the big features of Ruby in my eyes. But writing a system with many 0..*-Relationships between classes I everytime come to write code like: class MyClass def initialize @aRelation = [] end def add_aRelation(el) @aRelation << el end def each_aRelation @aRelation.each { |el| yield el } end end Is there a way to do something like: class MyClass attrList_accessor :aRelation end to get the above ? Or is thought about putting something like that into future versions of Ruby ? TIA Dirk Detering -aka Det