rdoc files: how to read them?

Discussion in 'Ruby' started by RichardOnRails, Mar 15, 2012.

  1. I saw a book on The Pragmatic Boookshelf that I thought I might wand to buy, but I saw no way to see a sample of its content a la Amazon.

    I downloaded its code and saw some .rdoc files. I could view them as text,but that's obviously not the best approach. I saw a recommendation somewhere to view them in a browser. I dragged the filename into the browser, which produced a somewhat better result.

    I believe that the content of http://www.ruby-doc.org/stdlib-1.9.2// is based on generated rdoc's and look great in my browser. What do I have to do to get the same formatting in my browser for the rdoc's I downloaded?

    I'm running Firefox 10.0.2 over WinXP-Pro/SP3.

    Thanks in Advance,
    Richard
     
    RichardOnRails, Mar 15, 2012
    #1
    1. Advertisements

  2. Am 15.03.2012 17:45, schrieb RichardOnRails:
    I don’t know the exact RDoc template they use at ruby-doc.org (I wish I
    did, it’s great), but you can transform RDoc files into HTML just the
    same way you transform Ruby documentation into HTML.

    $ rdoc file1.rdoc file2.rdoc file3.rdoc ...

    Note that under Ruby < 1.9 you have to install the `rdoc' gem first.

    Vale,
    Marvin
     
    Marvin Gülker, Mar 15, 2012
    #2
    1. Advertisements

  3. Hi Marvin,

    Thanks for your response.
    I got it working. I wrote up what I did and pasted an image of the Command Window when I was done. At the bottom you'll see the name of the html filethat was created, which creates a graphical report in the browser.

    There's enough there to reconstruct what I did and get the generated code.

    Thanks for your interest in my problem. All's well now.

    Best wishes,
    Richard
     
    RichardOnRails, Mar 16, 2012
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.