Module: ThinkingSphinx::Middlewares

Defined in:
lib/thinking_sphinx/middlewares.rb,
lib/thinking_sphinx/middlewares.rb

Defined Under Namespace

Classes: ActiveRecordTranslator, Geographer, Glazier, IdsOnly, Inquirer, Middleware, SphinxQL, StaleIdChecker, StaleIdFilter, UTF8

Constant Summary

BASE_MIDDLEWARES =
[SphinxQL, Geographer, Inquirer]
DEFAULT =
::Middleware::Builder.new do
  use StaleIdFilter
  ThinkingSphinx::Middlewares.use self, BASE_MIDDLEWARES
  use ActiveRecordTranslator
  use StaleIdChecker
  use Glazier
end
RAW_ONLY =
::Middleware::Builder.new do
  ThinkingSphinx::Middlewares.use self, BASE_MIDDLEWARES
end
IDS_ONLY =
::Middleware::Builder.new do
  ThinkingSphinx::Middlewares.use self, BASE_MIDDLEWARES
  use IdsOnly
end

Class Method Summary collapse

Class Method Details

.use(builder, middlewares) ⇒ Object



9
10
11
# File 'lib/thinking_sphinx/middlewares.rb', line 9

def self.use(builder, middlewares)
  middlewares.each { |m| builder.use m }
end