This question has been keeping me busy for some time now, so I hope someone has an idea on how to tackle this.
Lets take a simple Class
with a method
(simplified without an initialize method):
class MyClass
def my_method
page.search('//p')
end
end
Now, is there a way to retrieve the content of my_method
without executing it? I am looking to get the code that it will run when executed:
"page.search('//p')"
Is there a way to do that in Ruby?