From: Philip Hallstrom Date: 2006-04-21T08:13:38+09:00 Subject: how to figure out what class a method is in for a *class method*? Hi all - Given the following bit of code, I'd like it to spit out "Cat" followed by "Dog", but what I get now is "Object" twice. --------------------------------------------------------------- class Animal def self.what_am_i self.class end end class Cat < Animal end class Dog < Animal end puts Cat.what_am_i puts Dog.what_am_i --------------------------------------------------------------- The closest I can get is self.object_id which prints out different ID's, but I'd really like the name if I can get it... Thanks! -philip