Class: Rubinius::AST::Alias

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

Direct Known Subclasses

VAlias

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk

Constructor Details

#initialize(line, to, from) ⇒ Alias

Returns a new instance of Alias.



8
9
10
11
12
# File 'lib/compiler/ast/definitions.rb', line 8

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

Instance Attribute Details

#fromObject

Returns the value of attribute from.



6
7
8
# File 'lib/compiler/ast/definitions.rb', line 6

def from
  @from
end

#toObject

Returns the value of attribute to.



6
7
8
# File 'lib/compiler/ast/definitions.rb', line 6

def to
  @to
end

Instance Method Details

#to_sexpObject



14
15
16
# File 'lib/compiler/ast/definitions.rb', line 14

def to_sexp
  [:alias, @to.to_sexp, @from.to_sexp]
end