Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > rdoc with c extensions

Reply
Thread Tools

rdoc with c extensions

 
 
snacktime
Guest
Posts: n/a
 
      09-22-2006
I'm trying to figure out the best way to have docs for a c extension
generated when a gem is installed. Ideally I'd like to document the
methods in modname.rb, but I can't because if I define the methods in
modname.rb they will override the c functions. If I document the c
source, which is what I'm doing now, I'm not sure how to make my gem
automatically generate the rdoc from the c source. Also, rdoc doesn't
doesn't pick up the parameter names in a c function, it just calls
them p1,p2,p3,etc..

Chris

 
Reply With Quote
 
 
 
 
Eric Hodel
Guest
Posts: n/a
 
      10-15-2006
On Sep 22, 2006, at 12:32 PM, snacktime wrote:

> If I document the c source, which is what I'm doing now, I'm not
> sure how to make my gem
> automatically generate the rdoc from the c source.


Include the .c file in the RDoc file list and it will get scanned for
RDoc.

> Also, rdoc doesn't doesn't pick up the parameter names in a c
> function, it just calls
> them p1,p2,p3,etc..


Use :call-seq:, see array.c in ruby for an example.

--
Eric Hodel - http://www.velocityreviews.com/forums/(E-Mail Removed) - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use rdoc parsers outside of rdoc? Paul Van Delst Ruby 0 07-27-2006 07:18 PM
rdoc: how to add readme.rdoc as index.html? Iwan van der Kleyn Ruby 1 04-26-2005 12:37 PM
[RDOC] Using a template causes rdoc not to document some classes Daniel Berger Ruby 1 11-02-2004 08:23 PM
rdoc bug (and rdoc bug tracker site is down) Brian Schröder Ruby 5 09-18-2004 02:08 PM
rdoc: how to generate rdoc & ri documentation of standard library? Andreas Schwarz Ruby 6 01-01-2004 03:09 AM



Advertisments