[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

cross-reference RDoc

Phlip

7/24/2007 6:29:00 PM

Ruby zealots:

I want RDoc to document two modules. One contains def foo and the
other def bar.

I want the comment for foo to link to bar, so I write # See: bar

If bar were in the same module as foo, RDoc would hyperlink its name.

How do I get this effect working between modules? How can foo's
module's document contain a hyperlink to bar?

--
Phlip

3 Answers

Gavin Kistner

7/24/2007 7:47:00 PM

0

Phlip wrote:
> I want RDoc to document two modules. One contains def foo and the
> other def bar.
>
> I want the comment for foo to link to bar, so I write # See: bar
>
> If bar were in the same module as foo, RDoc would hyperlink its name.
>
> How do I get this effect working between modules? How can foo's
> module's document contain a hyperlink to bar?

C:\>type foo.rb
module Foo
# See Bar#bar
def foo; end
end

C:\>type bar.rb
module Bar
# See Foo#foo
def bar; end
end

C:\>rdoc *.rb

bar.rb: m.
foo.rb: m.
Generating HTML...

Files: 2
Classes: 0
Modules: 2
Methods: 2
Elapsed: 0.235s


C:\>findfile html$ Bar#bar
/doc/classes/Foo.html
="Bar.html#M000002">Bar#bar</a>

Found 1 file (out of 14) in 0.016 seconds
--
Posted via http://www.ruby-....

Phlip

7/25/2007 2:58:00 PM

0

Gavin Kistner wrote:

>> I want RDoc to document two modules. One contains def foo and the
>> other def bar.
>>
>> I want the comment for foo to link to bar, so I write # See: bar
>>
>> If bar were in the same module as foo, RDoc would hyperlink its name.
>>
>> How do I get this effect working between modules? How can foo's
>> module's document contain a hyperlink to bar?

> /doc/classes/Foo.html
> ="Bar.html#M000002">Bar#bar</a>

Thanks for the experiment... Now I have to demonstrate why it doesn't work
when the target is a Test::Unit.

--
Phlip
http://www.oreilly.com/catalog/9780...
^ assert_xpath
http://tinyurl.... <-- assert_raise_message

Phlip

7/25/2007 9:26:00 PM

0

Gavin Kistner wrote:

> # See Foo#foo
> def bar; end

And that was the secret - the complete type-path with #.

Thanks!

--
Phlip
http://www.oreilly.com/catalog/9780...
^ assert_xpath
http://tinyurl.... <-- assert_raise_message