Possible duplicate:
How to extract code from a Proc object?
What is the best way to turn a proc or method object into its source string? So far I have tried two approaches. One of them is to reach the source location of proc and read this part of the source code. Another is to use the library wizard and ripper. I am not sure if this is the right way to do this. The best may depend on various factors: reliability, fidelity to the original, speed, etc. Including approaches that I have proposed, but not limited to, propose a strategy and evaluate its limitations.
sawa
source share