I spent the day trying to grok the examples in xmpp4r (xmpp/jabber
for ruby; http://home.gna.org/xmpp4r/), and I ran up against a problem
I’ve had many times before, but haven’t found a good solution to yet.
Here’s the gist of it: I’m not aware of a good, solid, universal method
discovering the documentation of various libraries, classes, and methods
I saw some code that said “require callbacks”. I saw that it referenced
Callback class. So I went to the terminal and typed ri Callback, but ri
nothing was known about Callback.
Just for fun, I fired up irb and tried require-ing ‘callbacks’, but that
not work either, irb said there was no such file to load.
Maybe callbacks is not the best example; I don’t know - I’m still in the
dark about what they are (though I can imagine what they probably do,
Anyway, I’ve had this problem plenty of times before. And eventually, if
Google is unable to help (which has been the case so far with class
Callback), then of course it isn’t a big deal to grep the Ruby library
and/or sources and figure it out once and for all. But I like ruby so
and I feel that it deserves a better, more integrated solution for
users, especially newbies, to discover documentation - even if
has been left undocumented, at the very least I should be able to
where the source file resides (if it is available).
I realize that ruby might already be head and shoulders above the
competition in this department - I don’t want to sound like ruby is
lacking in this regard (because I honestly don’t know how the other
languages handle documentation discovery). Perhaps I’m spoiled by emacs,
where it’s always a simple matter to jump to the documentation of a
emacs function or library - and, from the documentation, to jump to the
actual source file from whence it was loaded.
I love ri, when it knows about what I’m asking it, but too often it is
unaware of the class or method I’m referring to. I think gem_server is
nifty, but I prefer ri in most cases because it takes a specific
rather than making me browse through web pages with my mouse.
I realize (I think!) that I could finesse ri’s database into something
is closer to what I want by making some rdoc incantations - and I’m
hear from anybody who does this and is satisfied with the results.
I’d also love to hear from anybody who shares my frustration (am I
as well as any ideas for going forward. Are there any efforts afoot
could lend a hand?
Thanks for any input,
John Emerson Conrad