Class: ThinkingSphinx::Callbacks::Appender

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/callbacks/appender.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model, reference, options, &block) ⇒ Appender

Returns a new instance of Appender.



8
9
10
11
12
13
# File 'lib/thinking_sphinx/callbacks/appender.rb', line 8

def initialize(model, reference, options, &block)
  @model = model
  @reference = reference
  @options = options
  @block = block
end

Class Method Details

.call(model, reference, options, &block) ⇒ Object



4
5
6
# File 'lib/thinking_sphinx/callbacks/appender.rb', line 4

def self.call(model, reference, options, &block)
  new(model, reference, options, &block).call
end

Instance Method Details

#callObject



15
16
17
18
19
20
# File 'lib/thinking_sphinx/callbacks/appender.rb', line 15

def call
  add_core_callbacks
  add_delta_callbacks     if behaviours.include?(:deltas)
  add_real_time_callbacks if behaviours.include?(:real_time)
  add_update_callbacks    if behaviours.include?(:updates)
end