Class: LedgerSync::Adaptors::Searcher

Inherits:
Object
  • Object
show all
Includes:
SimplySerializable::Mixin
Defined in:
lib/ledger_sync/adaptors/searcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#adaptorObject (readonly)

Returns the value of attribute adaptor.



8
9
10
# File 'lib/ledger_sync/adaptors/searcher.rb', line 8

def adaptor
  @adaptor
end

#paginationObject (readonly)

Returns the value of attribute pagination.



8
9
10
# File 'lib/ledger_sync/adaptors/searcher.rb', line 8

def pagination
  @pagination
end

#queryObject (readonly)

Returns the value of attribute query.



8
9
10
# File 'lib/ledger_sync/adaptors/searcher.rb', line 8

def query
  @query
end

#resourcesObject (readonly)

Returns the value of attribute resources.

Raises:

  • (NotImplementedError)


8
9
10
# File 'lib/ledger_sync/adaptors/searcher.rb', line 8

def resources
  @resources
end

Instance Method Details

#next_searcherObject

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/ledger_sync/adaptors/searcher.rb', line 26

def next_searcher
  raise NotImplementedError
end

#previous_searcherObject

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/ledger_sync/adaptors/searcher.rb', line 30

def previous_searcher
  raise NotImplementedError
end

#searchObject



38
39
40
# File 'lib/ledger_sync/adaptors/searcher.rb', line 38

def search
  @search ||= success
end