Class: Conductor::Http::Models::SearchResult
- Defined in:
- lib/conductor/http/models/search_result.rb
Overview
Generic scrollable search result
Constant Summary collapse
- SWAGGER_TYPES =
{ total_hits: 'Integer', results: 'Array<Object>' }.freeze
- ATTRIBUTE_MAP =
{ total_hits: :totalHits, results: :results }.freeze
Instance Attribute Summary collapse
-
#results ⇒ Object
Returns the value of attribute results.
-
#total_hits ⇒ Object
Returns the value of attribute total_hits.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ SearchResult
constructor
A new instance of SearchResult.
Methods inherited from BaseModel
attribute_map, deserialize_model, deserialize_value, find_model_class, from_hash, from_json, parse_datetime, swagger_types, #to_h, #to_json
Constructor Details
#initialize(params = {}) ⇒ SearchResult
Returns a new instance of SearchResult.
20 21 22 23 |
# File 'lib/conductor/http/models/search_result.rb', line 20 def initialize(params = {}) @total_hits = params[:total_hits] || 0 @results = params[:results] || [] end |
Instance Attribute Details
#results ⇒ Object
Returns the value of attribute results.
18 19 20 |
# File 'lib/conductor/http/models/search_result.rb', line 18 def results @results end |
#total_hits ⇒ Object
Returns the value of attribute total_hits.
18 19 20 |
# File 'lib/conductor/http/models/search_result.rb', line 18 def total_hits @total_hits end |