From: Jim Freeze Date: 2003-01-07T11:54:16+09:00 Subject: Re: attr_cast, one a small step for interface techniques On Tuesday, 7 January 2003 at 10:06:22 +0900, Tom Sawyer wrote: > On Monday 06 January 2003 04:55 am, Gavin Sinclair wrote: > > Naturally, you need attr_reader and attr_writer to work as intended, > > so they are the building blocks for attr_accessor. > > > thanks for the starter code > > so should attr_accessor call on attr_reader and attr_writer? also i am I think that would be the 'correct' way to do it. That way, you don't violate the DRY principle (Don't Repeat Yourself). > curoius, where can i find out exactly what attr_reader, writter, and accessor > currently do? The code Gavin supplied is pretty much all there is. You can google ruby-talk with +"class Module" +attr_reader and find several examples. -- Jim Freeze