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.
7 8 9 10 11 |
# File 'lib/arel/nodes/binary.rb', line 7 def initialize left, right super() @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left.
5 6 7 |
# File 'lib/arel/nodes/binary.rb', line 5 def left @left end |
#right ⇒ Object
Returns the value of attribute right.
5 6 7 |
# File 'lib/arel/nodes/binary.rb', line 5 def right @right end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
23 24 25 26 27 |
# File 'lib/arel/nodes/binary.rb', line 23 def eql? other self.class == other.class && self.left == other.left && self.right == other.right end |
#hash ⇒ Object
19 20 21 |
# File 'lib/arel/nodes/binary.rb', line 19 def hash [self.class, @left, @right].hash end |
#initialize_copy(other) ⇒ Object
13 14 15 16 17 |
# File 'lib/arel/nodes/binary.rb', line 13 def initialize_copy other super @left = @left.clone if @left @right = @right.clone if @right end |