Class: LedgerSync::Adaptors::Searcher
- Inherits:
-
Object
- Object
- LedgerSync::Adaptors::Searcher
- Includes:
- SimplySerializable::Mixin
- Defined in:
- lib/ledger_sync/adaptors/searcher.rb
Direct Known Subclasses
QuickBooksOnline::Searcher, QuickBooksOnline::Vendor::Searcher, Test::Account::Searcher, Test::Customer::Searcher, Test::Vendor::Searcher
Instance Attribute Summary collapse
-
#adaptor ⇒ Object
readonly
Returns the value of attribute adaptor.
-
#pagination ⇒ Object
readonly
Returns the value of attribute pagination.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
Instance Method Summary collapse
-
#initialize(adaptor:, query:, pagination: {}) ⇒ Searcher
constructor
A new instance of Searcher.
- #next_searcher ⇒ Object
- #previous_searcher ⇒ Object
- #search ⇒ Object
Constructor Details
#initialize(adaptor:, query:, pagination: {}) ⇒ Searcher
Returns a new instance of Searcher.
20 21 22 23 24 |
# File 'lib/ledger_sync/adaptors/searcher.rb', line 20 def initialize(adaptor:, query:, pagination: {}) @adaptor = adaptor @query = query @pagination = pagination end |
Instance Attribute Details
#adaptor ⇒ Object (readonly)
Returns the value of attribute adaptor.
8 9 10 |
# File 'lib/ledger_sync/adaptors/searcher.rb', line 8 def adaptor @adaptor end |
#pagination ⇒ Object (readonly)
Returns the value of attribute pagination.
8 9 10 |
# File 'lib/ledger_sync/adaptors/searcher.rb', line 8 def pagination @pagination end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
8 9 10 |
# File 'lib/ledger_sync/adaptors/searcher.rb', line 8 def query @query end |
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
8 9 10 |
# File 'lib/ledger_sync/adaptors/searcher.rb', line 8 def resources @resources end |
Instance Method Details
#next_searcher ⇒ Object
26 27 28 |
# File 'lib/ledger_sync/adaptors/searcher.rb', line 26 def next_searcher raise NotImplementedError end |
#previous_searcher ⇒ Object
30 31 32 |
# File 'lib/ledger_sync/adaptors/searcher.rb', line 30 def previous_searcher raise NotImplementedError end |
#search ⇒ Object
38 39 40 |
# File 'lib/ledger_sync/adaptors/searcher.rb', line 38 def search @search ||= success end |