RiDisplay interface in ri

Discussion in 'Ruby' started by Gerard A.W. Vreeswijk, Dec 1, 2004.

  1. Hi,

    In Ruby 1.8.0 I used to have a web interface to ri (local webserver)
    with a layout that for eye's ease closely resembled the layout of the
    online pickaxe. In addition the methods were hyperlinked so that my
    web-version of ri was easy to navigate. Very nice.

    When I switched to 1.8.2 I discovered that ri's interface is
    redefined. As described in ri's generated docs

    http://www.ruby-doc.org/stdlib/libdoc/rdoc/rdoc/classes/RiDisplay.html

    I tried to make up my own class which implements the various ‘display'
    methods in ‘DefaultDisplay',and include the ‘RiDisplay' module in that
    class. I did not succeed.

    By searching comp.lang.ruby I discovered that Kristof Bastiaensen
    wrote an ri interface for emacs, and I tried to adapt that, but
    without succes: basically I cannot force `MyDisplay' to write to
    string even if I set :stdout options to `false'. (By inspecting the
    code I saw that Ri simply overwrites this option if it discovers that
    its output isn't going to stdout.)

    I find ri's interface um .. not so very intuitive.

    Is there anyone who has used RiDisplay with succes and is willing to
    help me out writing my own interace? Thanks.
     
    Gerard A.W. Vreeswijk, Dec 1, 2004
    #1
    1. Advertising

  2. Gerard A.W. Vreeswijk

    Dave Thomas Guest

    On Dec 1, 2004, at 5:07, Gerard A.W. Vreeswijk wrote:

    > In Ruby 1.8.0 I used to have a web interface to ri (local webserver)
    > with a layout that for eye's ease closely resembled the layout of the
    > online pickaxe. In addition the methods were hyperlinked so that my
    > web-version of ri was easy to navigate. Very nice.


    Now that ri and rdoc are integrated, could you just rdoc your source
    tree and generate the html from that? It's hyperlinked, colorized,
    etc...

    > Is there anyone who has used RiDisplay with succes and is willing to
    > help me out writing my own interace? Thanks.


    You probably don't want to touch RiDisplay at all. You need to write a
    new formatter (have a look at ri_formatter/HtmlFormatter for some
    hints)


    Cheers

    Dave
     
    Dave Thomas, Dec 1, 2004
    #2
    1. Advertising

  3. Dave Thomas <> wrote:
    > Now that ri and rdoc are integrated, could you just rdoc your source
    > tree and generate the html from that? It's hyperlinked, colorized,
    > etc...


    As a matter of fact I did so yesterday with exactly that purpose [rdoc
    -d -o ../../rdoc], but probably at the root of the wrong tree :)
    I'll try again at the root of the source tree.

    > You probably don't want to touch RiDisplay at all. You need to write a
    > new formatter (have a look at ri_formatter/HtmlFormatter for some
    > hints)


    I'll do. Thanks.
     
    Gerard A.W. Vreeswijk, Dec 1, 2004
    #3
    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. Wildepiet
    Replies:
    0
    Views:
    1,879
    Wildepiet
    Jun 14, 2004
  2. cyberco
    Replies:
    8
    Views:
    507
    cyberco
    Feb 25, 2006
  3. Xah Lee
    Replies:
    15
    Views:
    607
    Sherm Pendley
    Mar 23, 2007
  4. Xah Lee
    Replies:
    15
    Views:
    640
    Sherm Pendley
    Mar 23, 2007
  5. Replies:
    4
    Views:
    358
    timjowers
    Nov 2, 2007
Loading...

Share This Page