cross-reference RDoc

Discussion in 'Ruby' started by Phlip, Jul 24, 2007.

  1. Phlip

    Phlip Guest

    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
     
    Phlip, Jul 24, 2007
    #1
    1. Advertising

  2. 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-forum.com/.
     
    Gavin Kistner, Jul 24, 2007
    #2
    1. Advertising

  3. Phlip

    Phlip Guest

    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/9780596510657/
    ^ assert_xpath
    http://tinyurl.com/23tlu5 <-- assert_raise_message
     
    Phlip, Jul 25, 2007
    #3
  4. Phlip

    Phlip Guest

    Phlip, Jul 25, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Schwarz
    Replies:
    6
    Views:
    254
    Randy W. Sims
    Jan 1, 2004
  2. Brian Schröder
    Replies:
    5
    Views:
    141
    Dave Thomas
    Sep 18, 2004
  3. Daniel Berger
    Replies:
    1
    Views:
    144
    Dave Thomas
    Nov 2, 2004
  4. Iwan van der Kleyn

    rdoc: how to add readme.rdoc as index.html?

    Iwan van der Kleyn, Apr 26, 2005, in forum: Ruby
    Replies:
    1
    Views:
    237
    Stefan Lang
    Apr 26, 2005
  5. Paul Van Delst

    How to use rdoc parsers outside of rdoc?

    Paul Van Delst, Jul 27, 2006, in forum: Ruby
    Replies:
    0
    Views:
    105
    Paul Van Delst
    Jul 27, 2006
Loading...

Share This Page