From: Robert Klemme Date: 2008-04-07T02:35:04+09:00 Subject: Re: Is posible to get the Module(s), Class and Method names in which we are? On 06.04.2008 14:39, Iñaki Baz Castillo wrote: > El Domingo, 6 de Abril de 2008, Iñaki Baz Castillo escribió: > >> module App >> module TransportLayer >> class Server >> def get_data() >> ... >> ... >> logger.info "We are in XXXXXXX" >> end >> end >> end >> end >> >> >> I'd like to see: >> "We are in App::TransportLayer::Server#get_data" >> >> Is it possible in anyway? The only I know how to do if getting the current >> Class name by doing "self.class.to_s". > > Ok sorry, I can get the modules and classes via "self.class.to_s": > => "App::Transport::Server::TCP" > > The only I miss if the method name, is ti possible? Yes, from caller(). Kind regards robert