Class: ThinkingSphinx::ActiveRecord::SQLBuilder::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/active_record/sql_builder/query.rb

Instance Method Summary collapse

Constructor Details

#initialize(report) ⇒ Query

Returns a new instance of Query



4
5
6
7
# File 'lib/thinking_sphinx/active_record/sql_builder/query.rb', line 4

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)



41
42
43
# File 'lib/thinking_sphinx/active_record/sql_builder/query.rb', line 41

def method_missing(*args, &block)
  report.send *args, &block
end

Instance Method Details

#to_queryObject



9
10
11
12
13
# File 'lib/thinking_sphinx/active_record/sql_builder/query.rb', line 9

def to_query
  filter_by_query_pre

  scope.compact
end