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



6
7
8
9
# File 'lib/thinking_sphinx/active_record/sql_builder/statement.rb', line 6

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)



119
120
121
# File 'lib/thinking_sphinx/active_record/sql_builder/statement.rb', line 119

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

Instance Method Details

#to_query_info_relationObject



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

def to_query_info_relation
  filter_by_query_info

  scope
end

#to_query_preObject



29
30
31
32
33
# File 'lib/thinking_sphinx/active_record/sql_builder/statement.rb', line 29

def to_query_pre
  filter_by_query_pre

  scope
end

#to_query_range_relationObject



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

def to_query_range_relation
  filter_by_query_range

  scope
end

#to_relationObject



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

def to_relation
  filter_by_scopes

  scope
end