Class: Arel::Nodes::Binary
Direct Known Subclasses
DeleteStatement, Equality, InfixOperation, JoinSource, Matches, Over, Regexp, TableAlias, Values, When
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
#_caller, #and, #each, #not, #or, #to_sql
Methods included from FactoryMethods
#create_and, #create_false, #create_join, #create_on, #create_string_join, #create_table_alias, #create_true, #grouping, #lower
Constructor Details
#initialize(left, right) ⇒ Binary
Returns a new instance of Binary.
6 7 8 9 10 |
# File 'lib/arel/nodes/binary.rb', line 6 def initialize left, right super() @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left.
4 5 6 |
# File 'lib/arel/nodes/binary.rb', line 4 def left @left end |
#right ⇒ Object
Returns the value of attribute right.
4 5 6 |
# File 'lib/arel/nodes/binary.rb', line 4 def right @right end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
22 23 24 25 26 |
# File 'lib/arel/nodes/binary.rb', line 22 def eql? other self.class == other.class && self.left == other.left && self.right == other.right end |
#hash ⇒ Object
18 19 20 |
# File 'lib/arel/nodes/binary.rb', line 18 def hash [self.class, @left, @right].hash end |
#initialize_copy(other) ⇒ Object
12 13 14 15 16 |
# File 'lib/arel/nodes/binary.rb', line 12 def initialize_copy other super @left = @left.clone if @left @right = @right.clone if @right end |