On Thu, 2007-01-11 at 19:04 +0900, Stefano Crocco wrote:

> In my opinion, there's also a third option: instead of postprocessing the 
> script when it's run, preprocess the file when you generate the 
> documentation. Instead of generating the doc directly using rdoc, use a 
> script which turns the parts you want included into comments. This is a 
> simple attempt at doing it:

I suppose another (though not immediate) option would be to make a
request to modify RDoc to accomplish this, or do it yourself and submit
a patch.

I don't know much about the RDoc layout, but I would think that a change
so that you had a series of start/stop tags that don't interfere with
code, but allow for documentation processing:

def func1
...
end

# START DOC PROCESSING
def func 2
...
end
# END DOC PROCESSING

should allow for the code to remain unchanged, and a properly modified
RDoc could still process this into documentation.

Matt