I can print a function's contents as a string in JS:
(function (x) { alert(x + 'y'); }).toString() > "function (x) { alert(x + 'y'); }"
Is there something similar with Ruby?