Class: Arel::Collectors::Composite

Inherits:
Object
  • Object
show all
Defined in:
lib/arel/collectors/composite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(left, right) ⇒ Composite

Returns a new instance of Composite.



9
10
11
12
# File 'lib/arel/collectors/composite.rb', line 9

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

Instance Attribute Details

#preparableObject

Returns the value of attribute preparable.



6
7
8
# File 'lib/arel/collectors/composite.rb', line 6

def preparable
  @preparable
end

#retryableObject

Returns the value of attribute retryable.



7
8
9
# File 'lib/arel/collectors/composite.rb', line 7

def retryable
  @retryable
end

Instance Method Details

#<<(str) ⇒ Object



20
21
22
23
24
# File 'lib/arel/collectors/composite.rb', line 20

def <<(str)
  left << str
  right << str
  self
end

#add_bind(bind, &block) ⇒ Object



26
27
28
29
30
# File 'lib/arel/collectors/composite.rb', line 26

def add_bind(bind, &block)
  left.add_bind bind, &block
  right.add_bind bind, &block
  self
end

#add_binds(binds, proc_for_binds = nil, &block) ⇒ Object



32
33
34
35
36
# File 'lib/arel/collectors/composite.rb', line 32

def add_binds(binds, proc_for_binds = nil, &block)
  left.add_binds(binds, proc_for_binds, &block)
  right.add_binds(binds, proc_for_binds, &block)
  self
end

#valueObject



38
39
40
# File 'lib/arel/collectors/composite.rb', line 38

def value
  [left.value, right.value]
end