# Problem with rdoc and Document-class

**URL:** <https://www.ruby-forum.com/t/problem-with-rdoc-and-document-class/81095>\
**Category:** Ruby\
**Created:** [January 3, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/problem-with-rdoc-and-document-class/81095 "2007-01-03T20:42:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 3, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/problem-with-rdoc-and-document-class/81095/1 "2007-01-03T20:42:15Z")

</div>

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
