views:

20

answers:

1

I have a series of Ruby methods andI would like to dump their return values out to a formatted report. However, I'd also like to annotate these results (i.e. with descriptions of what the value is), and I was wondering if I could use the existing comments on each method to do this annotating?

So I guess what I want to do is output the rdoc as normal but for each method actually run the method with an argument. The argument is the same for every single method, which simplifies it.

A: 

with 1.9 there is a Method#source_location that might be helpful for you (ripper might help,too). Also note: http://github.com/rdp/arguments might be helpful

rogerdpack