1

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?

elado
  • 8,149
  • 9
  • 50
  • 59

0 Answers0