Class: ThinkingSphinx::IndexSet
- Inherits:
-
Object
- Object
- ThinkingSphinx::IndexSet
- Includes:
- Enumerable
- Defined in:
- lib/thinking_sphinx/index_set.rb
Class Method Summary collapse
Instance Method Summary collapse
- #ancestors ⇒ Object
-
#initialize(options = {}, configuration = nil) ⇒ IndexSet
constructor
A new instance of IndexSet.
- #to_a ⇒ Object
Constructor Details
#initialize(options = {}, configuration = nil) ⇒ IndexSet
Returns a new instance of IndexSet.
13 14 15 16 17 |
# File 'lib/thinking_sphinx/index_set.rb', line 13 def initialize( = {}, configuration = nil) @options = @index_names = [:indices] || [] @configuration = configuration || ThinkingSphinx::Configuration.instance end |
Class Method Details
.reference_name(klass) ⇒ Object
6 7 8 9 |
# File 'lib/thinking_sphinx/index_set.rb', line 6 def self.reference_name(klass) @cached_results ||= {} @cached_results[klass.name] ||= klass.name.underscore.to_sym end |
Instance Method Details
#ancestors ⇒ Object
19 20 21 |
# File 'lib/thinking_sphinx/index_set.rb', line 19 def ancestors classes_and_ancestors - classes end |
#to_a ⇒ Object
23 24 25 |
# File 'lib/thinking_sphinx/index_set.rb', line 23 def to_a indices end |