On May 9, 2006, at 12:40 AM, Patrick wrote: > class Ab > def code > a = 5 > b = 2 > end > end > > Is there a way to store the actual code of a class or definition as a > string without manually doing it? Such as if you were doing a tutorial > on how something works. So basically I could do print aB and I get > "def > code a = 5 b = 2 end" > > -- > Posted via http://www.ruby-forum.com/. > Sounds like a job for xmp[1] [1] http://raa.ruby-lang.org/project/xmp/