rdoc: no source code in doc?

Discussion in 'Ruby' started by Patrick Gundlach, Jul 17, 2005.

  1. 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!)
    Patrick Gundlach, Jul 17, 2005
    #1
    1. Advertising

  2. Patrick Gundlach

    James Britt Guest

    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.ruby-doc.org - The Ruby Documentation Site
    http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
    http://www.rubystuff.com - The Ruby Store for Ruby Stuff
    http://www.jamesbritt.com - Playing with Better Toys
    James Britt, Jul 17, 2005
    #2
    1. Advertising


  3. >> 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...)
    Patrick Gundlach, Jul 17, 2005
    #3
  4. 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 <> wrote:
    >=20
    > >> 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. Mayb=

    e
    > > not.
    > >
    > > Run rdoc --help to see what it is.

    >=20
    > 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.
    >=20
    > I don't want the users of my library see how I implemented a method.
    > If anything is unclear, the documentation needs an update.
    >=20
    > Patrick
    >=20
    > (Well, I distribute the library as open source, but thats another story..=

    )
    >=20
    >=20



    --=20
    -Dan Nugent
    Daniel Nugent, Jul 18, 2005
    #4

  5. > 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
    Patrick Gundlach, Jul 18, 2005
    #5
    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. Matt
    Replies:
    3
    Views:
    484
    Tor Iver Wilhelmsen
    Sep 17, 2004
  2. Andreas Schwarz
    Replies:
    6
    Views:
    244
    Randy W. Sims
    Jan 1, 2004
  3. Brian Schröder
    Replies:
    5
    Views:
    129
    Dave Thomas
    Sep 18, 2004
  4. Daniel Berger
    Replies:
    1
    Views:
    139
    Dave Thomas
    Nov 2, 2004
  5. 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:
    221
    Stefan Lang
    Apr 26, 2005
Loading...

Share This Page