Class: ThinkingSphinx::IndexSet

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/thinking_sphinx/index_set.rb

Instance Method Summary (collapse)

Constructor Details

- (IndexSet) initialize(classes, index_names, configuration = nil)

Returns a new instance of IndexSet



4
5
6
7
8
# File 'lib/thinking_sphinx/index_set.rb', line 4

def initialize(classes, index_names, configuration = nil)
  @classes       = classes || []
  @index_names   = index_names
  @configuration = configuration || ThinkingSphinx::Configuration.instance
end

Instance Method Details

- (Object) ancestors



10
11
12
# File 'lib/thinking_sphinx/index_set.rb', line 10

def ancestors
  classes_and_ancestors - classes
end

- (Object) each(&block)



14
15
16
# File 'lib/thinking_sphinx/index_set.rb', line 14

def each(&block)
  indices.each { |index| yield index }
end

- (Object) to_a



18
19
20
# File 'lib/thinking_sphinx/index_set.rb', line 18

def to_a
  indices
end