From: Rick DeNatale Date: 2009-02-13T03:08:34+09:00 Subject: Re: docstrings --00163646c13c1765770462bca0ea Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Thu, Feb 12, 2009 at 12:48 PM, Roger Pack wrote: > > > Since docstrings, like rdoc comments have to appear in the source code, > > I > > don't understand how they help documenting code which is dynamically > > generated when the program is run. > > > > In my current project, I recently switched over from dynamicly defined > > methods to a rake task to generate some of the source code in order to > > have > > the resulting methods documented with RDOC/RI. > > I do like the current ri style, and it does 90% of what I'm asking for. > > So the question is what benefit is gained with dynamic documentation > over ri style comments? > > The two goals I'd have are 1) quick lookup from irb > Ex: > Currently ruby does not have a > method.desc > command. > See below > > and also documentation for dynamically generated methods. As you noted > above, it requires extra work. Rails, for example, cannot enumerate all > its possible dynamic methods. > > Is there a way in rdoc to describe dynamically generated methods? I don't think so, perhaps Eric Hodel can confirm or deny this. > > > The first goal is the most important, now that I think about it. > > I could create a gem which include "irb fastri" lookup [1]. No need to create a gem, you just put the code from the eigenclass article into ~/.irbrc and bob's yer uncle. > > -=r > [1] http://eigenclass.org/hiki/irb+ri+completion > > -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale --00163646c13c1765770462bca0ea--