From: Neil Stevens Date: 2004-11-11T14:53:41+09:00 Subject: Re: ruby idiom for attribute definition? On Thu, 11 Nov 2004 13:27:42 +0900, Corey wrote: > Hey! > > What do you guys do when you have a class with lots of simple attributes? > > Do you use attr_reader, and attr_writer shortcuts with each of the attributes? > Or do you use a singe method (say, object.set('attr', 'val') for all of them? > Or do you manually create each of the reader/writer methods? Try using attr_accessor, which makes an attribute readable and writable. -- Neil Stevens - neil@hakubi.us "The world is a dangerous place to live; not because of the people who are evil, but because of the people who don't do anything about it." -- Albert Einstein(?)