V
Vincent Foley
Hello everyone,
I was writing some code in irb this morning, and after a while, I
realized that I wanted to put that into a script. I had to go and copy
& paste every method by hand. I was wondering if there was a way to
get the source string of a class (or possibly, just a method)? Kind of
like the reverse of eval(). I know that some languages support this
feature (Forth and Factor come to mind).
Thanks
I was writing some code in irb this morning, and after a while, I
realized that I wanted to put that into a script. I had to go and copy
& paste every method by hand. I was wondering if there was a way to
get the source string of a class (or possibly, just a method)? Kind of
like the reverse of eval(). I know that some languages support this
feature (Forth and Factor come to mind).
Thanks