Advertisements

IÃ±aki Baz Castillo wrote:
> Hi, first of all I'm sorry since I already did this question some time ago
> (but I ca't find it now).
>
> Basically I want the following:
>
> ---------------
> module MyModule
>
> class MyClass
> def show_log
> puts "I'm here: ###### FIXME ######"
> end
> end
>
> end
>
>
> my_class = MyModule::MyClass.new
> my_class.show_log
> => I'm here: MyModule::MyClass#show_log
> ---------------
>
> When I did this question I remember that it was not possible with Ruby 1.8 but
> it was feasible in Ruby 1.9.
>
> Could you please show me how to get it?
> Thanks a lot.
>
>
>
>
Something I prefer to use is the __LINE__ and __FILE__ constants. They
work a treat!

=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!