"ahoward" <ahoward / fsl.noaa.gov> schrieb im Newsbeitrag news:Pine.LNX.4.53.0306162318250.21200 / eli.fsl.noaa.gov... > On Tue, 17 Jun 2003, Joel VanderWerf wrote: > > > Could you use #instance_variables for this, or do you need to > > distinguish those that have only readers from those that have only writers? > > exactly - though perhaps not in my example. Another option would be to follow the Java Properties approach, i.e., detect properties from a naming pattern. Unfortunately for ruby this means that one can only detect attributes that have reader and writer. Not very useful, I guess. Then your approach might be better. I didn't inspect your code, but did you provide an option to manually register attributes afterwards? Could be useful when inheriting classes that define attributes not via attr. Cheers robert