Class: SiteSearch::PublicationsAdapter::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/site_search/publications_adapter.rb

Overview

One page of publications plus the Pagy that describes where it sits.
degraded exists for shape parity with the engine adapters; our own
database either answers or raises, so it is always false here.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(items: [], pagy: nil, degraded: false) ⇒ Result

Returns a new instance of Result.

Parameters:

  • items (Array<SiteSearch::ResultItem>) (defaults to: [])
  • pagy (Pagy::Offset, nil) (defaults to: nil)
  • degraded (Boolean) (defaults to: false)


26
# File 'app/services/site_search/publications_adapter.rb', line 26

def initialize(items: [], pagy: nil, degraded: false) = super

Instance Attribute Details

#degradedObject (readonly)

Returns the value of attribute degraded

Returns:

  • (Object)

    the current value of degraded



22
23
24
# File 'app/services/site_search/publications_adapter.rb', line 22

def degraded
  @degraded
end

#itemsObject (readonly)

Returns the value of attribute items

Returns:

  • (Object)

    the current value of items



22
23
24
# File 'app/services/site_search/publications_adapter.rb', line 22

def items
  @items
end

#pagyObject (readonly)

Returns the value of attribute pagy

Returns:

  • (Object)

    the current value of pagy



22
23
24
# File 'app/services/site_search/publications_adapter.rb', line 22

def pagy
  @pagy
end