Class: LibRubyParser::Nodes::Alias

Inherits:
LibRubyParser::Node show all
Defined in:
lib/lib-ruby-parser/nodes.rb

Overview

Represents ‘alias to from` statement.

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

“‘text alias foo bar ~~~~~~~~~~~~~ “`

Returns:



38
39
40
# File 'lib/lib-ruby-parser/nodes.rb', line 38

def expression_l
  @expression_l
end

#fromNode (readonly)

Source of the alias.

‘Sym(“bar”)` node for `alias :foo :bar`

Returns:



20
21
22
# File 'lib/lib-ruby-parser/nodes.rb', line 20

def from
  @from
end

#keyword_lLoc (readonly)

Location of the alias keyword

“‘text alias foo bar ~~~~~ “`

Returns:



29
30
31
# File 'lib/lib-ruby-parser/nodes.rb', line 29

def keyword_l
  @keyword_l
end

#toNode (readonly)

Target of the alias.

‘Sym(“foo”)` node for `alias :foo :bar`

Returns:



14
15
16
# File 'lib/lib-ruby-parser/nodes.rb', line 14

def to
  @to
end