Class: Arel::Collectors::Composite
- Inherits:
-
Object
- Object
- Arel::Collectors::Composite
- Defined in:
- lib/arel/collectors/composite.rb
Instance Attribute Summary collapse
-
#preparable ⇒ Object
Returns the value of attribute preparable.
-
#retryable ⇒ Object
Returns the value of attribute retryable.
Instance Method Summary collapse
- #<<(str) ⇒ Object
- #add_bind(bind, &block) ⇒ Object
- #add_binds(binds, proc_for_binds = nil, &block) ⇒ Object
-
#initialize(left, right) ⇒ Composite
constructor
A new instance of Composite.
- #value ⇒ Object
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
#preparable ⇒ Object
Returns the value of attribute preparable.
6 7 8 |
# File 'lib/arel/collectors/composite.rb', line 6 def preparable @preparable end |
#retryable ⇒ Object
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 |
#value ⇒ Object
38 39 40 |
# File 'lib/arel/collectors/composite.rb', line 38 def value [left.value, right.value] end |