method

__method__

v1_8_7_330 - Show latest stable - Class: Kernel
__method__()
public

Returns the name of the current method as a Symbol. If called from inside of an aliased method it will return the original nonaliased name. If called outside of a method, it returns nil.

def foo
  __method__
end
alias bar foo

foo                # => :foo
bar                # => :foo