Class: ThinkingSphinx::RealTime::TranscribeInstance

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance, index, properties) ⇒ TranscribeInstance

Returns a new instance of TranscribeInstance.



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

def initialize(instance, index, properties)
  @instance, @index, @properties = instance, index, properties
end

Class Method Details

.call(instance, index, properties) ⇒ Object



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

def self.call(instance, index, properties)
  new(instance, index, properties).call
end

Instance Method Details

#callObject



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

def call
  properties.each_with_object([document_id]) do |property, instance_values|
    begin
      instance_values << property.translate(instance)
    rescue StandardError => error
      raise_wrapper error, property
    end
  end
end