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.



19
20
21
# File 'lib/thinking_sphinx/middlewares/geographer.rb', line 19

def initialize(context)
  @context = context
end

Instance Method Details

#callObject



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

def call
  return unless geo

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