Problem with rdoc and Document-class

D

Daniel Berger

Hi all,

Ruby 1.8.5
Solaris 10

For some reason the class level documentation isn't being generated
when I run rdoc over this file, except for the 'MyTest' module. Foo
and Bar show nothing. What am I doing wrong here?

/* mytest.c */
#include <ruby.h>

/* Some random test method */
static VALUE foo_test(VALUE self){
return rb_str_new2("hello");
}

/* To quench your thirst */
static VALUE bar_drink(VALUE self){
return rb_str_new2("gulp");
}

void Init_mytest(){
/*
* Document-module: Test
* The MyTest module, where we, like, test stuff.
*/
VALUE mTest = rb_define_module("MyTest");

/*
* Document-class: Foo
* Foo, Kung's second cousin, twice removed.
*/
VALUE cFoo = rb_define_class_under(mTest, "Foo", rb_cObject);

/*
* Document-class: Bar
* Bar, a class, not a drinking establishment.
*/
VALUE cBar = rb_define_class_under(mTest, "Bar", rb_cObject);

rb_define_method(cFoo, "test", foo_test, 0);
rb_define_method(cBar, "drink", bar_drink, 0);
}

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top