Class: ThinkingSphinx::Middlewares::Glazier::Inner

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

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Inner

Returns a new instance of Inner.



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

def initialize(context)
  @context = context
  @indices = {}
end

Instance Method Details

#callObject



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

def call
  return if context[:panes].empty?

  context[:results] = context[:results].collect { |result|
    ThinkingSphinx::Search::Glaze.new context, result, row_for(result),
      context[:panes]
  }
end