Created
April 12, 2012 15:52
-
-
Save hopsoft/2368535 to your computer and use it in GitHub Desktop.
Get the currently executing method's name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def current_method_name | |
caller[0][/`([^']*)'/, 1].to_sym | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment