[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RiDisplay interface in ri

gv

12/1/2004 10:07:00 AM

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/RiDi...

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.
2 Answers

Dave Thomas

12/1/2004 12:22:00 PM

0


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



gv

12/1/2004 7:43:00 PM

0

Dave Thomas <dave@pragprog.com> 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.