Hello everyone,

the shortcuts  attr_<reader|writer|accessor> 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