Do you want to do this?
Returns the unit number that was specified in ((<CDROM.new>)).
static VALUE cdrom_number(VALUE self)
return rb_iv_get(self, “@id”);
You can run rd2 on .c (even .h) files. The parser will eat it, because it
is just looking for =begin and =end.
I heard rumours that rdoc will support reading C source someday, but how
it will do that is a mystery to me!
On Wed, 5 Jun 2002, Berger, Daniel wrote:
Is there a way to use rd style documention within a .c extension? Is there
one of those “hidden” .h files that allows me to do this? Or does the
ruby.h file allow this somehow?
If not, what is the best way to create documentation for an extension? Just
create a separate .rd file to match the .c file? Right now I’m just
manually generating a text & html file, but I’d like to get away from that