Class: ThinkingSphinx::ActiveRecord::SQLBuilder::Query
- Inherits:
-
Object
- Object
- ThinkingSphinx::ActiveRecord::SQLBuilder::Query
- Defined in:
- lib/thinking_sphinx/active_record/sql_builder/query.rb
Instance Method Summary collapse
-
#initialize(report) ⇒ Query
constructor
A new instance of Query.
- #to_query ⇒ Object
Constructor Details
#initialize(report) ⇒ Query
Returns a new instance of Query.
6 7 8 9 |
# File 'lib/thinking_sphinx/active_record/sql_builder/query.rb', line 6 def initialize(report) self.report = report self.scope = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object (protected)
54 55 56 |
# File 'lib/thinking_sphinx/active_record/sql_builder/query.rb', line 54 def method_missing(*args, &block) report.send *args, &block end |
Instance Method Details
#to_query ⇒ Object
11 12 13 14 15 |
# File 'lib/thinking_sphinx/active_record/sql_builder/query.rb', line 11 def to_query filter_by_query_pre scope.compact end |