Class: Squeel::Nodes::Binary

Inherits:
Object
  • Object
show all
Includes:
PredicateOperators
Defined in:
lib/squeel/nodes/binary.rb

Direct Known Subclasses

Or

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from PredicateOperators

#&, #-@, #|

Constructor Details

#initialize(left, right) ⇒ Binary

Returns a new instance of Binary.



10
11
12
# File 'lib/squeel/nodes/binary.rb', line 10

def initialize(left, right)
  @left, @right = left, right
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



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

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



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

def right
  @right
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


14
15
16
17
18
# File 'lib/squeel/nodes/binary.rb', line 14

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