Class: Arel::Collectors::Composite
- Defined in:
- activerecord/lib/arel/collectors/composite.rb
Instance Method Summary collapse
- #<<(str) ⇒ Object
- #add_bind(bind, &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.
6 7 8 9 |
# File 'activerecord/lib/arel/collectors/composite.rb', line 6 def initialize(left, right) @left = left @right = right end |
Instance Method Details
#<<(str) ⇒ Object
11 12 13 14 15 |
# File 'activerecord/lib/arel/collectors/composite.rb', line 11 def <<(str) left << str right << str self end |
#add_bind(bind, &block) ⇒ Object
17 18 19 20 21 |
# File 'activerecord/lib/arel/collectors/composite.rb', line 17 def add_bind(bind, &block) left.add_bind bind, &block right.add_bind bind, &block self end |
#value ⇒ Object
23 24 25 |
# File 'activerecord/lib/arel/collectors/composite.rb', line 23 def value [left.value, right.value] end |