Class: Storage::Algolia::Actions::All
- Inherits:
-
Base
- Object
- ApplicationService
- Base
- Storage::Algolia::Actions::All
- Defined in:
- lib/storage/algolia/actions/all.rb
Instance Attribute Summary collapse
-
#cursor ⇒ Object
readonly
Returns the value of attribute cursor.
-
#model_name ⇒ Object
readonly
Returns the value of attribute model_name.
Instance Method Summary collapse
-
#initialize(model_name:, cursor: nil) ⇒ All
constructor
A new instance of All.
- #meta ⇒ Object
- #process ⇒ Object
Methods inherited from ApplicationService
Constructor Details
#initialize(model_name:, cursor: nil) ⇒ All
Returns a new instance of All.
11 12 13 14 |
# File 'lib/storage/algolia/actions/all.rb', line 11 def initialize(model_name:, cursor: nil) @model_name = model_name @cursor = cursor end |
Instance Attribute Details
#cursor ⇒ Object (readonly)
Returns the value of attribute cursor.
9 10 11 |
# File 'lib/storage/algolia/actions/all.rb', line 9 def cursor @cursor end |
#model_name ⇒ Object (readonly)
Returns the value of attribute model_name.
9 10 11 |
# File 'lib/storage/algolia/actions/all.rb', line 9 def model_name @model_name end |
Instance Method Details
#meta ⇒ Object
20 21 22 |
# File 'lib/storage/algolia/actions/all.rb', line 20 def query.except!('hits').to_hashugar end |
#process ⇒ Object
16 17 18 |
# File 'lib/storage/algolia/actions/all.rb', line 16 def process normalize query.dig('hits') end |