From: Nasir Khan Date: 2007-03-31T09:03:01+09:00 Subject: Re: Find the fully qualified name of a class from a string ------=_Part_52214_13922330.1175299380124 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline > I don't think that's what he's looking for. Thank you. He has a string containing Ruby source code which presumably defines a > class (or classes?) which might be contained within a module. He > want's to find the fully qualified name of this unknown class (or > classes?). Yes. The A::B is really just an example. > > WHY he wants to do this is beyond me. Huh! Then ask me. Anyway, there could be several uses for such a thing. Simplest use case would be a RAILS like (but not RAILS) situation where a controller is deployed on a running server which (controller) optionally comes as a string enveloped in a protocol message, this string is evaled and the controller is instatiated but the system also needs to maintain meta information including the name of the controller just deployed, which defaults to the fully qualified name of the class. My use case is similar. - Nasir -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/ > > ------=_Part_52214_13922330.1175299380124--