From: Benoit Cerrina Date: 2001-05-22T15:11:28+09:00 Subject: [ruby-talk:15529] Re: Newbye question: retrieving a Class by its classname Thank you, what if I'm in a method definition in another class? Or another way of saying it is what is the top level module in which Top level classes are defined? Benoit > if you are at root level, you may use plain const_get: > class TestClass > def TestClass.test > end > end > (const_get 'TestClass').test > > Aristarkh A Zagorodnikov, Lead Programmer, W3D Group > http://www.w3d.ru /// xm@w3d.ru /// ICQ UIN 36987938 >