Class: ThinkingSphinx::Deletion

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

Direct Known Subclasses

PlainDeletion, RealtimeDeletion

Defined Under Namespace

Classes: PlainDeletion, RealtimeDeletion

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Deletion) initialize(index, instance)



13
14
15
# File 'lib/thinking_sphinx/deletion.rb', line 13

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

Class Method Details

+ (Object) perform(index, instance)



4
5
6
7
8
9
10
11
# File 'lib/thinking_sphinx/deletion.rb', line 4

def self.perform(index, instance)
  {
    'plain' => PlainDeletion,
    'rt'    => RealtimeDeletion
  }[index.type].new(index, instance).perform
rescue Mysql2::Error => error
  # This isn't vital, so don't raise the error.
end