[newbie] "Printing" a class

Hi!

I would like to know if it's possible to "dump" how a class looks like.

E.g.

class Hello
     def initialize(name)
         @name = name
      end
end

[... lots of code here, and then I reopen the Hello class]

class Hello
     def say_hello
         puts @name
     end
end

Now what I would like to do is have a way to peek into exactly what this class looks like. I.e., I wanna do something that gives me this kind of output:

"class Hello
     def initialize(name)
         @name = name
      end

     def say_hello
         puts @name
     end
end"

Thanks a bunch for the help :slight_smile:
Rob

Hi!

I would like to know if it's possible to "dump" how a class looks like.

[...]

Now what I would like to do is have a way to peek into exactly what
this class looks like. I.e., I wanna do something that gives me this
kind of output:

Not at this point with standard Ruby. It may or may not appear in
standard Ruby in a later version, but the work that Ryan Davis and
Eric Hodel (for Ruby2Ruby) have been doing may be of use here.

-austin

···

On 9/29/05, Robert <mannl@gmx.com> wrote:
--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

Thanks a lot Austin, gonna check Ruby2Ruby out :slight_smile: