Class: PyramidScheme::Indexer::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/pyramid_scheme/indexer/base.rb

Overview

defines an interface for indexers

Direct Known Subclasses

ThinkingSphinx, Ultrasphinx

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



7
8
9
10
# File 'lib/pyramid_scheme/indexer/base.rb', line 7

def initialize
  @index_task_name = self.class.index_task_name
  @configure_task_name = self.class.configure_task_name
end

Instance Attribute Details

#configure_task_nameObject (readonly)

Returns the value of attribute configure_task_name.



5
6
7
# File 'lib/pyramid_scheme/indexer/base.rb', line 5

def configure_task_name
  @configure_task_name
end

#index_task_nameObject (readonly)

Returns the value of attribute index_task_name.



5
6
7
# File 'lib/pyramid_scheme/indexer/base.rb', line 5

def index_task_name
  @index_task_name
end

Instance Method Details

#configureObject



12
13
14
# File 'lib/pyramid_scheme/indexer/base.rb', line 12

def configure
  Rake::Task[@configure_task_name].invoke
end

#indexObject



16
17
18
# File 'lib/pyramid_scheme/indexer/base.rb', line 16

def index
  Rake::Task[@index_task_name].invoke
end