How to get the name of the calling method?

puts caller[0]

or perhaps…

puts caller[0][/`.*'/][1..-2]

Leave a Comment