cross-reference RDoc

P

Phlip

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?
 
G

Gavin Kistner

Phlip said:
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
 
P

Phlip

/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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top