Ryan Davis
10/15/2006 11:10:00 AM
On Oct 14, 2006, at 8:48 PM, Pau Garcia i Quiles wrote:
> Hello,
>
> I have developed a library to read and parse XSPF playlists. Most
> of the
> methods (90%) are metagenerated using something like this:
>
> class XSPFBlah
>
> attributes = %w{ attrib1 attrib2 }
> attributes.each do |attrib|
> define_method(attrib.to_sym) { do_something }
> end
>
> def initialize(source)
> do something
> end
> end
>
> RDoc does not find the metaprogrammed methods, therefore the
> documentation is
> useless. Is there anything I could do to get RDoc to work?
I don't know what XSPF is so this might be a terribly ignorant
question... but... what value do you get from having a bunch of
redundant documentation for methods that presumably do mostly the
same thing across the board? Which is worse, zero useless
documentation or lots of useless documentation?
I generally don't bother documenting my generated accessors for
exactly this reason. They're obvious and usually wouldn't benefit
from doco.