Class: Quo::QueryComposer
- Inherits:
-
Object
- Object
- Quo::QueryComposer
- Defined in:
- lib/quo/query_composer.rb
Instance Method Summary collapse
- #compose ⇒ Object
-
#initialize(left, right, joins = nil) ⇒ QueryComposer
constructor
A new instance of QueryComposer.
Constructor Details
#initialize(left, right, joins = nil) ⇒ QueryComposer
Returns a new instance of QueryComposer.
5 6 7 8 9 10 11 12 13 |
# File 'lib/quo/query_composer.rb', line 5 def initialize(left, right, joins = nil) @left = left @right = right @unwrapped_left = unwrap_relation(left) @unwrapped_right = unwrap_relation(right) @left_relation = @unwrapped_left.is_a?(::ActiveRecord::Relation) @right_relation = @unwrapped_right.is_a?(::ActiveRecord::Relation) @joins = joins end |
Instance Method Details
#compose ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/quo/query_composer.rb', line 15 def compose Quo::MergedQuery.new( merge_left_and_right, left, right, ** ) end |