Self-awareness of methods

Given a class and the name of a method in that class, is it possible
to make Ruby print out the code for the method? (I’m thinking of using
it for debugging dynamically generated methods.)

Maybe debug.rb and tracer.rb can give you some help. Tracer reads in the
source file lines from file for debug to display to the user during a
session.

···

----- Original Message -----
From: “Philip Mak” pmak@animeglobe.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Sunday, August 11, 2002 11:24 AM
Subject: Self-awareness of methods

Given a class and the name of a method in that class, is it possible
to make Ruby print out the code for the method? (I’m thinking of using
it for debugging dynamically generated methods.)