PDA

View Full Version : a method to bring forth an object's ri documentation


rubydoobiedoo
June 10th, 2005, 03:29 AM
I am not sure what would be involved, but I often find myself at an irb
prompt wanting to finish a statement with even more help about the
object, such as the ri documentation. I have found ways of manually
examining any objects methods, and finding all the objects.. but.. I
beleive it would enhance the use of irb very much were there a .ri
method which printed the related documentation. I beleive it should
somehow be added to the most early, low-level object in Ruby and
thereby link the documentation with the objects themselves in a Ruby
way.

It's just an idea in case somebody wants to add it into Ruby! I don't know
how yet, but I keep wanting it.

ezmobius
June 17th, 2005, 02:02 AM
you could always call:
system("ri Hash")
or whatever you want to look up. It will let you page through the ri docs with a "less" type of interface until you press "q" to exit and then it will dump you righth back into irb ;-)