Class: LibRubyParser::Nodes::Alias
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::Alias
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents ‘alias to from` statement.
Instance Attribute Summary collapse
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#from ⇒ Node
readonly
Source of the
alias. -
#keyword_l ⇒ Loc
readonly
Location of the
aliaskeyword. -
#to ⇒ Node
readonly
Target of the
alias.
Instance Attribute Details
#expression_l ⇒ Loc (readonly)
Location of the full expression
“‘text alias foo bar ~~~~~~~~~~~~~ “`
38 39 40 |
# File 'lib/lib-ruby-parser/nodes.rb', line 38 def expression_l @expression_l end |
#from ⇒ Node (readonly)
Source of the alias.
‘Sym(“bar”)` node for `alias :foo :bar`
20 21 22 |
# File 'lib/lib-ruby-parser/nodes.rb', line 20 def from @from end |
#keyword_l ⇒ Loc (readonly)
Location of the alias keyword
“‘text alias foo bar ~~~~~ “`
29 30 31 |
# File 'lib/lib-ruby-parser/nodes.rb', line 29 def keyword_l @keyword_l end |
#to ⇒ Node (readonly)
Target of the alias.
‘Sym(“foo”)` node for `alias :foo :bar`
14 15 16 |
# File 'lib/lib-ruby-parser/nodes.rb', line 14 def to @to end |