Class: Arel::Collectors::Composite
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/collectors/composite.rb
Instance Attribute Summary collapse
-
#preparable ⇒ Object
Returns the value of attribute preparable.
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.
8 9 10 11 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/collectors/composite.rb', line 8 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/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/collectors/composite.rb', line 6 def preparable @preparable end |
Instance Method Details
#<<(str) ⇒ Object
13 14 15 16 17 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/collectors/composite.rb', line 13 def <<(str) left << str right << str self end |
#add_bind(bind, &block) ⇒ Object
19 20 21 22 23 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/collectors/composite.rb', line 19 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
25 26 27 28 29 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/collectors/composite.rb', line 25 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
31 32 33 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/collectors/composite.rb', line 31 def value [left.value, right.value] end |