From: Joel VanderWerf Date: 2008-11-27T02:40:52+09:00 Subject: Re: attr_reader, default attribute value, and rdoc of attribute dkmd_nielsen wrote: > What I want to do is create an attribute, allow it to have a default > value, and have the attribute documented as such (and not as a method) > with rdoc. So, would the proper syntax for accomplishing this > elementary feat be: Something else to consider, along with the other suggestions, is the -A switch in rdoc: --accessor, -A accessorname[,..] comma separated list of additional class methods that should be treated like 'attr_reader' and friends. Option may be repeated. Each accessorname may have '=text' appended, in which case that text appears where the r/w/rw appears for normal accessors. So you could define a class method just to let rdoc know that your method should be documented as an attribute. The actual implementation of the method can be anything. You class method could also arrange the default value.... -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407