Class: Twostroke::AST::Assignment

Inherits:
Base
  • Object
show all
Defined in:
lib/twostroke/ast/assignment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Twostroke::AST::Base

Instance Attribute Details

#leftObject

Returns the value of attribute left.



3
4
5
# File 'lib/twostroke/ast/assignment.rb', line 3

def left
  @left
end

#rightObject

Returns the value of attribute right.



3
4
5
# File 'lib/twostroke/ast/assignment.rb', line 3

def right
  @right
end

Instance Method Details

#collapseObject



5
6
7
# File 'lib/twostroke/ast/assignment.rb', line 5

def collapse
  self.class.new left: left.collapse, right: right.collapse
end