Class: Arel::Nodes::Binary

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#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
# File 'lib/arel/nodes/binary.rb', line 6

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

Instance Attribute Details

#leftObject

Returns the value of attribute left.



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

def left
  @left
end

#rightObject

Returns the value of attribute right.



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

def right
  @right
end

Instance Method Details

#initialize_copy(other) ⇒ Object



11
12
13
14
15
# File 'lib/arel/nodes/binary.rb', line 11

def initialize_copy other
  super
  @left  = @left.clone if @left
  @right = @right.clone if @right
end