Class: Gitlab::EmptySearchResults
- Inherits:
-
Object
- Object
- Gitlab::EmptySearchResults
- Defined in:
- lib/gitlab/empty_search_results.rb
Overview
This class has the same interface as SearchResults except it is empty and does not do any work.
We use this when responding to abusive search requests.
Instance Method Summary collapse
- #aggregations ⇒ Object
- #formatted_count ⇒ Object
- #highlight_map ⇒ Object
-
#initialize ⇒ EmptySearchResults
constructor
A new instance of EmptySearchResults.
- #objects ⇒ Object
Constructor Details
#initialize ⇒ EmptySearchResults
Returns a new instance of EmptySearchResults.
9 10 |
# File 'lib/gitlab/empty_search_results.rb', line 9 def initialize(*) end |
Instance Method Details
#aggregations ⇒ Object
24 25 26 |
# File 'lib/gitlab/empty_search_results.rb', line 24 def aggregations(*) [] end |
#formatted_count ⇒ Object
16 17 18 |
# File 'lib/gitlab/empty_search_results.rb', line 16 def formatted_count(*) '0' end |
#highlight_map ⇒ Object
20 21 22 |
# File 'lib/gitlab/empty_search_results.rb', line 20 def highlight_map(*) {} end |
#objects ⇒ Object
12 13 14 |
# File 'lib/gitlab/empty_search_results.rb', line 12 def objects(*) Kaminari.paginate_array([]) end |