[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rdoc: no source code in doc?

Patrick Gundlach

7/17/2005 2:08:00 PM

Hello out there,

I have yet another rdoc question: How do I prevent that the source
code appears in the documentation at all?

Patrick

(who finds rdoc really useful!)
4 Answers

james_b

7/17/2005 4:45:00 PM

0

Patrick Gundlach wrote:
> Hello out there,
>
> I have yet another rdoc question: How do I prevent that the source
> code appears in the documentation at all?

There's a command-line switch, which thought was off by default. Maybe
not.

Run rdoc --help to see what it is.


James

--

http://www.ru... - The Ruby Documentation Site
http://www.r... - News, Articles, and Listings for Ruby & XML
http://www.rub... - The Ruby Store for Ruby Stuff
http://www.jame... - Playing with Better Toys


Patrick Gundlach

7/17/2005 6:16:00 PM

0


>> I have yet another rdoc question: How do I prevent that the source
>> code appears in the documentation at all?
>
> There's a command-line switch, which thought was off by default. Maybe
> not.
>
> Run rdoc --help to see what it is.

Well, I did that (even before I wrote the question) but the only
switch related to the source is if it should be displayed inline or as
a pop-up. But I don't want the reader of the rdoc documentation see
the implementation.

I don't want the users of my library see how I implemented a method.
If anything is unclear, the documentation needs an update.

Patrick

(Well, I distribute the library as open source, but thats another story...)

Daniel Nugent

7/18/2005 12:26:00 AM

0

And if it is unclear and it does need an update, but the user still
needs to get something done, then he's kinda SOL if he can't see the
source.

And in THAT case, he's probablly just going to dig into his include
directory and look up the danged function.

Anyway, takinga quick look at the command line options, it looks like
you're going to have to grab the default RDoc template and switch it
around so that it doesn't have the source section in it. The option
is --template or -T and the templates can be found in
ruby/lib/ruby/1.8/rdoc/generators/template/html

At least I think that's it.

On 7/17/05, Patrick Gundlach <clr6.10.randomuser@spamgourmet.com> wrote:
>
> >> I have yet another rdoc question: How do I prevent that the source
> >> code appears in the documentation at all?
> >
> > There's a command-line switch, which thought was off by default. Maybe
> > not.
> >
> > Run rdoc --help to see what it is.
>
> Well, I did that (even before I wrote the question) but the only
> switch related to the source is if it should be displayed inline or as
> a pop-up. But I don't want the reader of the rdoc documentation see
> the implementation.
>
> I don't want the users of my library see how I implemented a method.
> If anything is unclear, the documentation needs an update.
>
> Patrick
>
> (Well, I distribute the library as open source, but thats another story..)
>
>


--
-Dan Nugent


Patrick Gundlach

7/18/2005 10:33:00 AM

0


> And if it is unclear and it does need an update, but the user still
> needs to get something done, then he's kinda SOL if he can't see the
> source.

> And in THAT case, he's probablly just going to dig into his include
> directory and look up the danged function.

Right, because the rdoc documented source might call some private
methods that are not documented by default. So I consider the inline
source mostly useless anyway :)

OK, hacking the [a] template worked fine.

Thanks,

Patrick