Class: QuickSearch::Searcher

Inherits:
Object
  • Object
show all
Includes:
QueryFilter
Defined in:
app/searchers/quick_search/searcher.rb

Direct Known Subclasses

BestBetsSearcher

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_client, q, per_page, offset = 0, page = 1, on_campus = false, scope = '', params = {}) ⇒ Searcher

TODO: What should the method signature be?



8
9
10
11
12
13
14
15
16
# File 'app/searchers/quick_search/searcher.rb', line 8

def initialize(http_client, q, per_page, offset = 0, page = 1, on_campus = false, scope = '', params = {})
  @http = http_client
  @q = q
  @per_page = per_page
  @page = page
  @offset = offset
  @on_campus = on_campus
  @scope = scope
end

Instance Attribute Details

#httpObject

Returns the value of attribute http.



3
4
5
# File 'app/searchers/quick_search/searcher.rb', line 3

def http
  @http
end

Returns the value of attribute loaded_link.



3
4
5
# File 'app/searchers/quick_search/searcher.rb', line 3

def loaded_link
  @loaded_link
end

#offsetObject

Returns the value of attribute offset.



3
4
5
# File 'app/searchers/quick_search/searcher.rb', line 3

def offset
  @offset
end

#pageObject

Returns the value of attribute page.



3
4
5
# File 'app/searchers/quick_search/searcher.rb', line 3

def page
  @page
end

#per_pageObject

Returns the value of attribute per_page.



3
4
5
# File 'app/searchers/quick_search/searcher.rb', line 3

def per_page
  @per_page
end

#qObject

Returns the value of attribute q.



3
4
5
# File 'app/searchers/quick_search/searcher.rb', line 3

def q
  @q
end

#responseObject

Returns the value of attribute response.



3
4
5
# File 'app/searchers/quick_search/searcher.rb', line 3

def response
  @response
end

#results_listObject

Returns the value of attribute results_list.



3
4
5
# File 'app/searchers/quick_search/searcher.rb', line 3

def results_list
  @results_list
end

#scopeObject

Returns the value of attribute scope.



3
4
5
# File 'app/searchers/quick_search/searcher.rb', line 3

def scope
  @scope
end

#totalObject

Returns the value of attribute total.



3
4
5
# File 'app/searchers/quick_search/searcher.rb', line 3

def total
  @total
end

Instance Method Details

#resultsObject

results must create a @results_list attribute



24
25
26
# File 'app/searchers/quick_search/searcher.rb', line 24

def results
  raise #FIXME: pick some good error
end

#searchObject

a search must



19
20
21
# File 'app/searchers/quick_search/searcher.rb', line 19

def search
  raise # FIXME: pick some good error
end