Class: SiteSearch::SwiftypeAdapter::Result
- Inherits:
-
Data
- Object
- Data
- SiteSearch::SwiftypeAdapter::Result
- Defined in:
- app/services/site_search/swiftype_adapter.rb
Overview
One page of engine results plus the Pagy that describes where it sits.
degraded marks a page the engine failed to answer, so "nothing matched"
is never confused with "we never got a reply".
Instance Attribute Summary collapse
-
#degraded ⇒ Object
readonly
Returns the value of attribute degraded.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#pagy ⇒ Object
readonly
Returns the value of attribute pagy.
Instance Method Summary collapse
-
#initialize(items: [], pagy: nil, degraded: false) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(items: [], pagy: nil, degraded: false) ⇒ Result
Returns a new instance of Result.
79 |
# File 'app/services/site_search/swiftype_adapter.rb', line 79 def initialize(items: [], pagy: nil, degraded: false) = super |
Instance Attribute Details
#degraded ⇒ Object (readonly)
Returns the value of attribute degraded
75 76 77 |
# File 'app/services/site_search/swiftype_adapter.rb', line 75 def degraded @degraded end |
#items ⇒ Object (readonly)
Returns the value of attribute items
75 76 77 |
# File 'app/services/site_search/swiftype_adapter.rb', line 75 def items @items end |
#pagy ⇒ Object (readonly)
Returns the value of attribute pagy
75 76 77 |
# File 'app/services/site_search/swiftype_adapter.rb', line 75 def pagy @pagy end |