Represents the use of the ‘alias` keyword to alias a method.

alias foo bar
^^^^^^^^^^^^^
Attributes
Read

Represents the new name of the method that will be aliased.

alias foo bar
      ^^^

alias :foo :bar
      ^^^^

alias :"#{foo}" :"#{bar}"
      ^^^^^^^^^
Read

Represents the old name of the method that will be aliased.

alias foo bar
          ^^^

alias :foo :bar
           ^^^^

alias :"#{foo}" :"#{bar}"
                ^^^^^^^^^
Class Methods

Initialize a new AliasMethodNode node.

Return a symbol representation of this node type. See ‘Node::type`.

Instance Methods

Implements case-equality for the node. This is effectively == but without comparing the value of locations. Locations are checked only for presence.

def accept: (Visitor visitor) -> void

def child_nodes: () -> Array[nil | Node]

def comment_targets: () -> Array[Node | Location]

def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: SymbolNode | InterpolatedSymbolNode, ?old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, ?keyword_loc: Location) -> AliasMethodNode

An alias for child_nodes

def inspect -> String

def keyword: () -> String

Represents the location of the ‘alias` keyword.

alias foo bar
^^^^^

Save the keyword_loc location using the given saved source so that it can be retrieved later.

Return a symbol representation of this node type. See ‘Node#type`.