class ThinkingSphinx::Distributed::Index

Attributes

options[R]
reference[R]

Public Class Methods

new(reference) click to toggle source
Calls superclass method
# File lib/thinking_sphinx/distributed/index.rb, line 6
def initialize(reference)
  @reference = reference
  @options   = {}

  super reference.to_s.gsub('/', '_')
end

Public Instance Methods

delta?() click to toggle source
# File lib/thinking_sphinx/distributed/index.rb, line 13
def delta?
  false
end
distributed?() click to toggle source
# File lib/thinking_sphinx/distributed/index.rb, line 17
def distributed?
  true
end
model() click to toggle source
# File lib/thinking_sphinx/distributed/index.rb, line 21
def model
  @model ||= reference.to_s.camelize.constantize
end
primary_key() click to toggle source
# File lib/thinking_sphinx/distributed/index.rb, line 25
def primary_key
  @primary_key ||= configuration.settings['primary_key'] || :id
end

Private Instance Methods

configuration() click to toggle source
# File lib/thinking_sphinx/distributed/index.rb, line 31
def configuration
  ThinkingSphinx::Configuration.instance
end