Class: ThinkingSphinx::RealTime::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/real_time/processor.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(indices) ⇒ Processor

Returns a new instance of Processor.



8
9
10
# File 'lib/thinking_sphinx/real_time/processor.rb', line 8

def initialize(indices)
  @indices = indices
end

Class Method Details

.call(indices, &block) ⇒ Object



4
5
6
# File 'lib/thinking_sphinx/real_time/processor.rb', line 4

def self.call(indices, &block)
  new(indices).call(&block)
end

Instance Method Details

#call(&block) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/thinking_sphinx/real_time/processor.rb', line 12

def call(&block)
  subscribe_to_progress

  indices.each do |index|
    ThinkingSphinx::RealTime.populator.populate index

    block.call
  end
end