Class: Influxdb::Arel::Nodes::Binary

Inherits:
Node
  • Object
show all
Defined in:
lib/influxdb/arel/nodes/binary.rb

Direct Known Subclasses

Duration, Equality, InfixOperation, TableAlias

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#and, #or, #to_sql

Constructor Details

#initialize(left, right) ⇒ Binary

Returns a new instance of Binary.



7
8
9
10
11
# File 'lib/influxdb/arel/nodes/binary.rb', line 7

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

Instance Attribute Details

#leftObject

Returns the value of attribute left.



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

def left
  @left
end

#rightObject

Returns the value of attribute right.



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

def right
  @right
end

Instance Method Details

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

Returns:

  • (Boolean)


23
24
25
# File 'lib/influxdb/arel/nodes/binary.rb', line 23

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

#hashObject



19
20
21
# File 'lib/influxdb/arel/nodes/binary.rb', line 19

def hash
  [left, right].hash
end

#initialize_copy(other) ⇒ Object



13
14
15
16
17
# File 'lib/influxdb/arel/nodes/binary.rb', line 13

def initialize_copy(other)
  super
  self.left = left.clone if left
  self.right = right.clone if right
end