Class: Melbourne::AST::Alias

Inherits:
Node
  • Object
show all
Defined in:
lib/melbourne/ast/definitions.rb

Overview

An alias statement as in:

alias x y

Direct Known Subclasses

VAlias

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, to, from) ⇒ Alias

Returns a new instance of Alias.



19
20
21
22
23
# File 'lib/melbourne/ast/definitions.rb', line 19

def initialize(line, to, from)
  @line = line
  @to = to
  @from = from
end

Instance Attribute Details

#fromObject

The alias that is defined for the element



17
18
19
# File 'lib/melbourne/ast/definitions.rb', line 17

def from
  @from
end

#toObject

The element that is aliased



13
14
15
# File 'lib/melbourne/ast/definitions.rb', line 13

def to
  @to
end