Class: QuickSearch::Searcher
- Inherits:
-
Object
- Object
- QuickSearch::Searcher
- Includes:
- QueryFilter
- Defined in:
- app/searchers/quick_search/searcher.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#http ⇒ Object
Returns the value of attribute http.
-
#loaded_link ⇒ Object
Returns the value of attribute loaded_link.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#page ⇒ Object
Returns the value of attribute page.
-
#per_page ⇒ Object
Returns the value of attribute per_page.
-
#q ⇒ Object
Returns the value of attribute q.
-
#response ⇒ Object
Returns the value of attribute response.
-
#results_list ⇒ Object
Returns the value of attribute results_list.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#total ⇒ Object
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(http_client, q, per_page, offset = 0, page = 1, on_campus = false, scope = '', params = {}) ⇒ Searcher
constructor
TODO: What should the method signature be?.
-
#results ⇒ Object
results must create a @results_list attribute.
-
#search ⇒ Object
a search must.
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
#http ⇒ Object
Returns the value of attribute http.
3 4 5 |
# File 'app/searchers/quick_search/searcher.rb', line 3 def http @http end |
#loaded_link ⇒ Object
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 |
#offset ⇒ Object
Returns the value of attribute offset.
3 4 5 |
# File 'app/searchers/quick_search/searcher.rb', line 3 def offset @offset end |
#page ⇒ Object
Returns the value of attribute page.
3 4 5 |
# File 'app/searchers/quick_search/searcher.rb', line 3 def page @page end |
#per_page ⇒ Object
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 |
#q ⇒ Object
Returns the value of attribute q.
3 4 5 |
# File 'app/searchers/quick_search/searcher.rb', line 3 def q @q end |
#response ⇒ Object
Returns the value of attribute response.
3 4 5 |
# File 'app/searchers/quick_search/searcher.rb', line 3 def response @response end |
#results_list ⇒ Object
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 |
#scope ⇒ Object
Returns the value of attribute scope.
3 4 5 |
# File 'app/searchers/quick_search/searcher.rb', line 3 def scope @scope end |
#total ⇒ Object
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
#results ⇒ Object
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 |
#search ⇒ Object
a search must
19 20 21 |
# File 'app/searchers/quick_search/searcher.rb', line 19 def search raise # FIXME: pick some good error end |