Module: LedgerSync::Ledgers::Mixins::OffsetAndLimitPaginationSearcherMixin
- Included in:
- TestLedger::Searcher
- Defined in:
- lib/ledger_sync/ledgers/mixins/offset_and_limit_pagination_searcher_mixin.rb
Instance Method Summary collapse
Instance Method Details
#next_searcher ⇒ Object
7 8 9 |
# File 'lib/ledger_sync/ledgers/mixins/offset_and_limit_pagination_searcher_mixin.rb', line 7 def next_searcher paginate(limit: limit, offset: offset + limit) end |
#previous_searcher ⇒ Object
11 12 13 14 15 |
# File 'lib/ledger_sync/ledgers/mixins/offset_and_limit_pagination_searcher_mixin.rb', line 11 def previous_searcher return nil if offset <= 1 paginate(limit: limit, offset: offset - limit) end |