J
Jamis Buck
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?
- Jamis
--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis
"I use octal until I get to 8, and then I switch to decimal."
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?
- Jamis
--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis
"I use octal until I get to 8, and then I switch to decimal."