From: Vassilis Rizopoulos Date: 2008-11-14T02:34:23+09:00 Subject: Re: Getting the comments(RDoc/ri) while running Aldric Giacomoni wrote: > It's a little open-ended ... I use Netbeans as my IDE when I write code, > its code-completion feature is amazing for Ruby as well as Rails. Would > that satisfy you? It shows a list of commands and the rdoc for it > underneath. > > OK, just to clarify a bit: I use these methods in my app and they add functionality that needs specific parameters and configuration. It's an exte. The parameters are described in the comments for the methods. Now, I want to be able (from within my app) to display the documentation for those methods. 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) Cheers, V.- > --Aldric > > Vassilis Rizopoulos wrote: > >> The problem: >> There is this parser, dynamically extensible with methods from modules. >> In very mundane fashion the methods have a standard prefix (like >> Test::Unit does it) so there is no problem getting the list of the methods. >> Now the methods handle elements in a DSL and there are conditions and >> parameters that each element expects. All this information is currently >> available as an RDoc comment for each method. >> Aside from making a system call to ri and grabbing the output is there >> any other clever way to grab those comment lines? >> Now, I want the comments in the RDoc so I don't want to do something >> like the 'desc "describe this task"' trick that rake does. >> Any clever ideas? >> Cheers, >> V.- >> > > > -- http://www.braveworld.net/riva