From: Tim Hunter Date: 2004-04-06T07:24:20+09:00 Subject: Re: object.@attribute On Tue, 06 Apr 2004 06:26:28 +0900, Hal Fulton wrote: > In practice, I've never used attr_writer. It's hard to imagine something > useful being write-only and not readable. (Insert Perl wisecrack here.) Well, I'll leave it up to you to decide whether or not it's useful, but RMagick defines special classes whose purpose is to collect optional arguments when a method has a _lot_ of optional arguments. For example, the montage method has 15 optional arguments, so it creates a "montage arguments" object and yields in that object's context: img.montage { self.background_color = 'red' self.font = 'Arial' # ... etc. } These attributes are write-only. I'm not claiming this was my idea, but offhand I forget where I saw it :-)