From: Claus Spitzer Date: 2004-07-19T02:24:39+09:00 Subject: Looking at a Class's source Is there a way to look at the source of a class? E.g. class Foo def bar # something end def foo # something else end end [0] Foo.source =>class Foo def bar # something end def foo # something else end end [1] Even being able to look at a method's source would be helpful, e.g. [2] Foo.bar.source => def bar # something end [3] Pretty printing is not necessary. I've looked at the built-in classes and modules and at tha standard library, and haven't been able to find anything related to this. If there is no way to do such thing then a simple "no" is sufficient, I'm just curious as to whether it is possible or not. Cheers! -CWS