Class: ThinkingSphinx::Middlewares::Geographer::Inner

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/middlewares/geographer.rb

Defined Under Namespace

Classes: GeolocationAttributes

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Inner

Returns a new instance of Inner



17
18
19
# File 'lib/thinking_sphinx/middlewares/geographer.rb', line 17

def initialize(context)
  @context = context
end

Instance Method Details

#callObject



21
22
23
24
25
26
# File 'lib/thinking_sphinx/middlewares/geographer.rb', line 21

def call
  return unless geo

  context[:sphinxql].prepend_values geodist_clause
  context[:panes] << ThinkingSphinx::Panes::DistancePane
end