Class: Georgia::Indexer::Adapter::Extension

Inherits:
Object
  • Object
show all
Defined in:
lib/georgia/indexer/adapter.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Extension

Returns a new instance of Extension.



23
24
25
# File 'lib/georgia/indexer/adapter.rb', line 23

def initialize klass
  @klass = klass
end

Instance Method Details

#filenameObject



36
37
38
# File 'lib/georgia/indexer/adapter.rb', line 36

def filename
  @klass.to_s.underscore
end

#nameObject



27
28
29
30
# File 'lib/georgia/indexer/adapter.rb', line 27

def name
  name = @klass.to_s.gsub('::', '') + 'Extension'
  "#{Georgia::Indexer.adapter}::#{name}".constantize
end

#pathObject



32
33
34
# File 'lib/georgia/indexer/adapter.rb', line 32

def path
  "georgia/indexer/extensions/#{Georgia.indexer}_adapter/#{filename}"
end