From: Dave Thomas Date: 2008-11-14T07:08:46+09:00 Subject: Re: Getting the comments(RDoc/ri) while running On Nov 13, 2008, at 3:19 PM, Ryan Davis wrote: >> I can do it by calling `ri method_name` and grabbind the output but >> I was wondering if there is a cleverer way (and one that does not >> require ri to be in the path) > > you can certainly access the data directly. look at rdoc/ri/ > driver.rb... thar be dragons. If all you want is the comment, you could also just use caller() to find the line number and source file containing the method, open that file, and scan backwards from the method definition...