Class: Documentation::Searchers::Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/documentation/searchers/abstract.rb

Direct Known Subclasses

Simple

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Abstract

Returns a new instance of Abstract.



7
8
9
10
# File 'lib/documentation/searchers/abstract.rb', line 7

def initialize(options = {})
  @options = options
  setup
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/documentation/searchers/abstract.rb', line 5

def options
  @options
end

Instance Method Details

#delete(page) ⇒ Object

Delete a page from the index



28
29
30
# File 'lib/documentation/searchers/abstract.rb', line 28

def delete(page)
  false
end

#index(page) ⇒ Object

Add or update an page in the index



42
43
# File 'lib/documentation/searchers/abstract.rb', line 42

def index(page)
end

#resetObject

Reset an index to have no data within it



35
36
37
# File 'lib/documentation/searchers/abstract.rb', line 35

def reset
  true
end

#search(query, options = {}) ⇒ Object

Search for a page from the index



21
22
23
# File 'lib/documentation/searchers/abstract.rb', line 21

def search(query, options = {})
  []
end

#setupObject

Run whatever initial set up is needed



15
16
# File 'lib/documentation/searchers/abstract.rb', line 15

def setup
end