you cant do it directly, but there is a method called caller I think. Youll
have to look up stuff and try, but this is kind of what you will end up with
def method_name
return caller.last
end
def my_method
puts "Im in the #{ method_name } method"
end
Hope that helps
Paul
On Tue, Apr 7, 2009 at 12:21 AM, Vikas Tulashyam <[email protected]>wrote:
>
> Hi,
> Can I get the name of the currently running methods with the class and
> package name. like--
>
> class A
>
> def method()
> puts nameofThecurrentMethod
>
> end
>
> end
>
>
> let suppose there is a method nameofThecurrentMethod which prints the
> name of the currently running method. Is it possible in Watir?
>
> Thanks
> vikas
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---