Class: LedgerSync::Ledgers::Searcher
- Inherits:
-
Object
- Object
- LedgerSync::Ledgers::Searcher
- Includes:
- Mixins::InferResourceClassMixin, Mixins::InferSerializerMixin, Mixins::SerializationMixin, SimplySerializable::Mixin
- Defined in:
- lib/ledger_sync/ledgers/searcher.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#pagination ⇒ Object
readonly
Returns the value of attribute pagination.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
- #deserializer_class ⇒ Object
-
#initialize(client:, query:, pagination: {}) ⇒ Searcher
constructor
A new instance of Searcher.
- #next_searcher ⇒ Object
- #previous_searcher ⇒ Object
- #resources ⇒ Object
- #search ⇒ Object
Methods included from Mixins::SerializationMixin
#deserializer, included, #serializer
Methods included from Mixins::InferSerializerMixin
Methods included from Mixins::InferResourceClassMixin
Constructor Details
#initialize(client:, query:, pagination: {}) ⇒ Searcher
Returns a new instance of Searcher.
23 24 25 26 27 |
# File 'lib/ledger_sync/ledgers/searcher.rb', line 23 def initialize(client:, query:, pagination: {}) @client = client @query = query @pagination = pagination end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
11 12 13 |
# File 'lib/ledger_sync/ledgers/searcher.rb', line 11 def client @client end |
#pagination ⇒ Object (readonly)
Returns the value of attribute pagination.
11 12 13 |
# File 'lib/ledger_sync/ledgers/searcher.rb', line 11 def pagination @pagination end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
11 12 13 |
# File 'lib/ledger_sync/ledgers/searcher.rb', line 11 def query @query end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
11 12 13 |
# File 'lib/ledger_sync/ledgers/searcher.rb', line 11 def request @request end |
Instance Method Details
#deserializer_class ⇒ Object
29 30 31 |
# File 'lib/ledger_sync/ledgers/searcher.rb', line 29 def deserializer_class @deserializer_class ||= self.class.inferred_deserializer_class end |
#next_searcher ⇒ Object
33 34 35 |
# File 'lib/ledger_sync/ledgers/searcher.rb', line 33 def next_searcher raise NotImplementedError end |
#previous_searcher ⇒ Object
37 38 39 |
# File 'lib/ledger_sync/ledgers/searcher.rb', line 37 def previous_searcher raise NotImplementedError end |
#resources ⇒ Object
41 42 43 |
# File 'lib/ledger_sync/ledgers/searcher.rb', line 41 def resources raise NotImplementedError end |
#search ⇒ Object
45 46 47 |
# File 'lib/ledger_sync/ledgers/searcher.rb', line 45 def search @search ||= success end |