[RDOC] Creating my own section in a page

D

Daniel Berger

Hi all,

I've got a C extension that I want to rdocify. It works well enough,
but I have a couple of constants I want included in the documentation.

I see that rdoc generates "Methods", "Public Class Methods", etc, for
the class. But, I want to add a "Constants" section on that page and
explicitly document a couple of constants.

Is this possible? How should I comment it in the C code?

Regards,

Dan
 
D

Dave Thomas

I see that rdoc generates "Methods", "Public Class Methods", etc, for
the class. But, I want to add a "Constants" section on that page and
explicitly document a couple of constants.

Is this possible? How should I comment it in the C code?

Not right now (although you could just list them in the file-level
heading). I _could_ handle the various rb_xxx_const methods, but I'm
not sure I'd know where to look for the associated comment.


Cheers

Dave
 
D

Daniel Berger

Dave Thomas said:
Not right now (although you could just list them in the file-level
heading). I _could_ handle the various rb_xxx_const methods, but I'm
not sure I'd know where to look for the associated comment.


Cheers

Dave

How about a Document-constant: directive? Another alternative is to
use any comment to the right of rb_define_const, e.g.

rb_define_const(klass,"FOO",50); /* The FOO constant is blah, blah */

Or both. :)

Regards,

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,160
Messages
2,570,889
Members
47,422
Latest member
LatashiaZc

Latest Threads

Top