Vincent Fourmond
9/20/2006 1:13:00 PM
Hello !
>
> In short, no it is not possible (in an easy way) -- but just wait, and
> someone smarter than me will prove me wrong. ;) See also Kernel#caller
> [1]
Based on that, you could try something as follows:
def who_am_i?
return caller[0]
end
def meth
p who_am_i?
end
meth
As it returns text, you'll need some regular expression handling, but
that could help you...
Vince, in a ruby mood today...