Class: Noiseless::Response::Empty
- Defined in:
- lib/noiseless/response/empty.rb
Constant Summary collapse
- EMPTY_RESPONSE =
{ "hits" => { "total" => { "value" => 0 }, "hits" => [] }, "took" => 0 }.freeze
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(model_class = nil) ⇒ Empty
constructor
A new instance of Empty.
Methods inherited from Base
#aggregations, #count, #each_with_index, #empty?, #hits, #include_pagination_info, #length, #response, #result, #results, #suggestions, #took, #total, #total_count
Methods included from Pagination::ResponsePagination
#current_page, #first_page?, #last_page?, #limit_value, #next_page, #offset_value, #out_of_range?, #pagination_metadata, #prev_page, #total_pages
Constructor Details
#initialize(model_class = nil) ⇒ Empty
Returns a new instance of Empty.
11 12 13 |
# File 'lib/noiseless/response/empty.rb', line 11 def initialize(model_class = nil) super(EMPTY_RESPONSE, model_class) end |
Instance Method Details
#each ⇒ Object
15 16 17 |
# File 'lib/noiseless/response/empty.rb', line 15 def each return enum_for(__method__) unless block_given? end |