Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rubydoc ?

7 views
Skip to first unread message

Vincent Bernat

unread,
Jan 3, 2002, 12:20:56 PM1/3/02
to
Hi !

I am a bit disappointed with the documentation tool "rdtool". The
".rd" is separated from the ".rb" and it may be a pain to keep the two
in sync. However, it seems that is the standard tool for documenting
ruby program.

With Javadoc, keeping in sync the doc and the code is more easy ; the
doc is embedded in the code and the tool maintains coherence : you
cannot comment a parameter which is not a parameter of the function,
you cannot say you throw an exception you don't throw.

I have found a tool called rubydoc which tries to mimic Javadoc
feature, however, it is very basic. I have found with Google an "old"
thread about comments (/* */ comments) but it is very difficult to
follow since threads are broken.

Is there a way to use rdtool with an approach closer to Javadoc ? Or
is it a good tool that would fit my needs (maybe a tool which
transforms embedded docs into .rd) ?
--
BOFH excuse #5:
static from plastic slide rules

Joel VanderWerf

unread,
Jan 3, 2002, 12:54:08 PM1/3/02
to
Vincent Bernat wrote:
>
> Hi !
>
> I am a bit disappointed with the documentation tool "rdtool". The
> ".rd" is separated from the ".rb" and it may be a pain to keep the two
> in sync.

This is from the pickaxe book chapter on embedded docs:

RD documentation can be included directly in a Ruby source
program or written into a separate file (which by convention
will have the extension .rd).

I always keep docs in the same file and run rd2html on my .rb file, to
help keep things in sync.

> However, it seems that is the standard tool for documenting
> ruby program.

The emerging standard seems to be rdoc:
http://rdoc.sourceforge.net
It looks very nice, but I haven't used it yet.

Michael Kelly

unread,
Jan 3, 2002, 1:07:14 PM1/3/02
to
On Thu, 03 Jan 2002 18:20:56 +0100, Vincent Bernat
<ber...@scientist.com> wrote:

>I am a bit disappointed with the documentation tool "rdtool". The
>".rd" is separated from the ".rb" and it may be a pain to keep the two
>in sync. However, it seems that is the standard tool for documenting
>ruby program.

Speaking of which I'm a new user of Ruby, right now just
using it on Win32 as I get acquainted with it. Anyway,
the dist. comes with some .rd files, but AFAICS no
rdtool or rd2 or any way to manage or create or
read them. Is a Win32 port of the rdtool under way?

TIA


Mike

--

"I don't want to belong to any club that would have me as a member."
-- Groucho Marx

Vincent Bernat

unread,
Jan 3, 2002, 1:27:57 PM1/3/02
to
OoO Pendant le repas du jeudi 03 janvier 2002, vers 19:07, Michael
Kelly <mkelly20...@earthlink.net> disait:

> Speaking of which I'm a new user of Ruby, right now just
> using it on Win32 as I get acquainted with it. Anyway,
> the dist. comes with some .rd files, but AFAICS no
> rdtool or rd2 or any way to manage or create or
> read them. Is a Win32 port of the rdtool under way?

rdtool is written in Ruby so I think you can install it. However, Racc
seems to use a C program so I don't knwo if it is easy to port it.

nobu....@softhome.net

unread,
Jan 3, 2002, 1:58:22 PM1/3/02
to
At Fri, 4 Jan 2002 03:11:09 +0900,

Michael Kelly <mkelly20...@earthlink.net> wrote:
> Speaking of which I'm a new user of Ruby, right now just
> using it on Win32 as I get acquainted with it. Anyway,
> the dist. comes with some .rd files, but AFAICS no
> rdtool or rd2 or any way to manage or create or
> read them. Is a Win32 port of the rdtool under way?

You can read them with any text editors can handle LF only
newlines.

And rdtool works also on win32. It uses racc but works without
it using files under missing/rd, racc binary packages are
available.

http://www.ruby-lang.org/~usa/mswin32/ext/racc-1.4.1-all-i586-mswin32-1.6.zip
http://www.ruby-lang.org/~eban/ruby/binaries/

Also ActiveScriptRuby contains all needed for rdtool.

http://www.geocities.co.jp/SiliconValley-PaloAlto/9251/ruby/main.html

--
Nobu Nakada

Michael Kelly

unread,
Jan 3, 2002, 4:06:02 PM1/3/02
to
On Thu, 03 Jan 2002 18:58:22 GMT, nobu....@softhome.net wrote:
[snip]

Thank you.

Michael Kelly

unread,
Jan 3, 2002, 5:03:28 PM1/3/02
to
On Thu, 03 Jan 2002 18:58:22 GMT, nobu....@softhome.net wrote:

>Also ActiveScriptRuby contains all needed for rdtool.
>
> http://www.geocities.co.jp/SiliconValley-PaloAlto/9251/ruby/main.html

I have ms installer update 1.2 on Win98 2nd Ed. and when I click on
ActiveRuby.msi I get "Cannot open installation file. Check to see
that the file is a valid MS Installer file" or whatever. I notice on
your site you have a link to MS Installer update v 1.1. Do you
think they did something to break your code?

Michael Kelly

unread,
Jan 3, 2002, 5:42:08 PM1/3/02
to
On Thu, 03 Jan 2002 22:03:28 GMT, Michael Kelly
<mkelly20...@earthlink.net> wrote:

>On Thu, 03 Jan 2002 18:58:22 GMT, nobu....@softhome.net wrote:
>
>>Also ActiveScriptRuby contains all needed for rdtool.
>>
>> http://www.geocities.co.jp/SiliconValley-PaloAlto/9251/ruby/main.html
>
>I have ms installer update 1.2 on Win98 2nd Ed. and when I click on
>ActiveRuby.msi I get "Cannot open installation file. Check to see
>that the file is a valid MS Installer file" or whatever. I notice on
>your site you have a link to MS Installer update v 1.1. Do you
>think they did something to break your code?
>
>

btw-as update, I tried it also in Win2000 Server and
got the same error. I did 2 separate downloads to
different folders and ran CRC32 on the files and got
the same number so it's not likely a download corruption.

Michael Kelly

unread,
Jan 3, 2002, 7:31:15 PM1/3/02
to
On Thu, 03 Jan 2002 22:42:08 GMT, Michael Kelly
<mkelly20...@earthlink.net> wrote:

>btw-as update, I tried it also in Win2000 Server and
>got the same error. I did 2 separate downloads to
>different folders and ran CRC32 on the files and got
>the same number so it's not likely a download corruption.

btw-ActiveRuby.1.6.5.7.msi does the same thing too.
I've installed ActivePython and ActivePerl both using
.msi installer packages so I'm at a loss what could be
up unless maybe this package requires fonts to be
installed for Japanese character set? It's the only
thing I can think of at the moment. :)

Jim Brunjes

unread,
Jan 3, 2002, 10:03:07 PM1/3/02
to
Michael Kelly wrote:
> Speaking of which I'm a new user of Ruby, right now just
> using it on Win32 as I get acquainted with it. Anyway,
> the dist. comes with some .rd files, but AFAICS no
> rdtool or rd2 or any way to manage or create or
> read them. Is a Win32 port of the rdtool under way?

Are you using the latest self-installer distribution from
pragmaticprogrammer.com? I believe that in the recent distributions
rd2 works fine out of the box.

I think I had an older version of the pragprog distribution on a
Windows 98 machine and I discovered I had to set up an "rd2.bat" in my
ruby\bin directory to get it to work. Try something like this:

@echo off
"c:\ruby\bin\ruby" "c:\ruby\bin\rd2" %1 %2 %3 %4 %5 %6 %7 %8 %9

Hope that helps.

Jim

Michael Kelly

unread,
Jan 4, 2002, 2:15:56 PM1/4/02
to
On 3 Jan 2002 19:03:07 -0800, jbru...@ctr.lacity.org (Jim Brunjes)
wrote:

>Are you using the latest self-installer distribution from
>pragmaticprogrammer.com? I believe that in the recent distributions
>rd2 works fine out of the box.

Thanks Jim. Dowloading now. :)

0 new messages