On Sun, 15 Oct 2006, Ryan Davis wrote:

> 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.

that's an extremely good point.  a constant could solve this nicely then:

class XSPFBlah
#
# docs for ATTRIBUTES
#
   ATTRIBUTES = %w{
     attrib1
     attrib2
   }

   ATTRIBUTES.each do |attrib|
     define_method(attrib.to_sym) { do_something }
   end

   def initialize(source)
     do something
   end
end


since rdocs does indeed doccument those now and, as you point out, the doc
block would already be the same for all those methods.

cheers.

-a
-- 
my religion is very simple.  my religion is kindness. -- the dalai lama