Class: MSFLVisitors::Nodes::Binary

Inherits:
Base
  • Object
show all
Defined in:
lib/msfl_visitors/nodes/binary.rb

Direct Known Subclasses

Comparison, Containment, Foreign, Partial

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#accept

Constructor Details

#initialize(left, right) ⇒ Binary

Returns a new instance of Binary.



7
8
9
10
# File 'lib/msfl_visitors/nodes/binary.rb', line 7

def initialize(left, right)
  self.left = left
  self.right = right
end

Instance Attribute Details

#leftObject

Returns the value of attribute left.



5
6
7
# File 'lib/msfl_visitors/nodes/binary.rb', line 5

def left
  @left
end

#rightObject

Returns the value of attribute right.



5
6
7
# File 'lib/msfl_visitors/nodes/binary.rb', line 5

def right
  @right
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
15
16
# File 'lib/msfl_visitors/nodes/binary.rb', line 12

def ==(other)
  self.class == other.class &&
      self.left == other.left &&
      self.right == other.right
end