RiDisplay interface in ri

  • Thread starter Gerard A.W. Vreeswijk
  • Start date
G

Gerard A.W. Vreeswijk

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

Dave Thomas

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
 
G

Gerard A.W. Vreeswijk

Dave Thomas said:
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.
 

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

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,698
Latest member
LydiaHalle

Latest Threads

Top