On Sep 9, 2004, at 10:37, Jamis Buck wrote:

> I've got a set of about 26 classes that are all very similar, and I'm 
> using a loop (containing _n_ lines of code) in some C code to create 
> them (instead of using 26*n lines of code). Naturally, RDoc can't 
> parse those definitions out, but I'd like them documented. For now, 
> I'm doing something like this:
>
>   #ifdef DONT_DEFINE___RDOC_PURPOSES_ONLY
>     x = rb_define_class_under( MyModule, "Class1", ParentClass )
>     x = rb_define_class_under( MyModule, "Class2", ParentClass )
>     ...
>     x = rb_define_class_under( MyModule, "Class26", ParentClass )
>   #endif
>
> And then I'm using "Document-class:" comments to document each class 
> individually. It seems to work, but I'm wondering: is there a better 
> way to do this?

I'm resisting the temptation to let RDoc run code during the 
documentation process: I don't want it to become a vector for 
introducing problems into user's machines. So for now I think your way 
is probably the best.

Except... would it help to be able to say

* Document-class:  A, B, C, D, E...

Cheers

Dave