Class: ThinkingSphinx::ActiveRecord::SQLBuilder::Statement

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

Instance Method Summary collapse

Constructor Details

#initialize(report) ⇒ Statement

Returns a new instance of Statement.



8
9
10
11
# File 'lib/thinking_sphinx/active_record/sql_builder/statement.rb', line 8

def initialize(report)
  @report = report
  @scope  = relation
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args, &block) ⇒ Object (private)



111
112
113
# File 'lib/thinking_sphinx/active_record/sql_builder/statement.rb', line 111

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

Instance Method Details

#to_query_preObject



25
26
27
28
29
# File 'lib/thinking_sphinx/active_record/sql_builder/statement.rb', line 25

def to_query_pre
  filter_by_query_pre

  scope
end

#to_query_range_relationObject



19
20
21
22
23
# File 'lib/thinking_sphinx/active_record/sql_builder/statement.rb', line 19

def to_query_range_relation
  filter_by_query_range

  scope
end

#to_relationObject



13
14
15
16
17
# File 'lib/thinking_sphinx/active_record/sql_builder/statement.rb', line 13

def to_relation
  filter_by_scopes

  scope
end