Class: Influxdb::Arel::Nodes::Binary
- Defined in:
- lib/influxdb/arel/nodes/binary.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Node
Instance Attribute Summary collapse
-
#left ⇒ Object
Returns the value of attribute left.
-
#right ⇒ Object
Returns the value of attribute right.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(left, right) ⇒ Binary
constructor
A new instance of Binary.
- #initialize_copy(other) ⇒ Object
Methods inherited from Node
Methods included from Extensions::BooleanPredications
Constructor Details
#initialize(left, right) ⇒ Binary
Returns a new instance of Binary.
7 8 9 10 11 12 13 |
# File 'lib/influxdb/arel/nodes/binary.rb', line 7 def initialize(left, right) super() left = left.to_s if Symbol === left right = right.to_s if Symbol === right self.left = left self.right = right end |
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left.
5 6 7 |
# File 'lib/influxdb/arel/nodes/binary.rb', line 5 def left @left end |
#right ⇒ Object
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: ==
25 26 27 |
# File 'lib/influxdb/arel/nodes/binary.rb', line 25 def eql?(other) self.class == other.class && left == other.left && right == other.right end |
#hash ⇒ Object
21 22 23 |
# File 'lib/influxdb/arel/nodes/binary.rb', line 21 def hash [left, right].hash end |
#initialize_copy(other) ⇒ Object
15 16 17 18 19 |
# File 'lib/influxdb/arel/nodes/binary.rb', line 15 def initialize_copy(other) super self.left = left.safe_clone if left self.right = right.safe_clone if right end |