__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
  alias bar foo

  foo                # => :foo
  bar                # => :foo
Show source
Register or log in to add new notes.