Class: LedgerSync::Adaptors::Searcher

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mixins::InferLedgerSerializerMixin

included

Methods included from Mixins::InferResourceClassMixin

included

Constructor Details

#initialize(adaptor:, query:, pagination: {}) ⇒ Searcher

Returns a new instance of Searcher.



22
23
24
25
26
# File 'lib/ledger_sync/adaptors/searcher.rb', line 22

def initialize(adaptor:, query:, pagination: {})
  @adaptor = adaptor
  @query = query
  @pagination = pagination
end

Instance Attribute Details

#adaptorObject (readonly)

Returns the value of attribute adaptor.



10
11
12
# File 'lib/ledger_sync/adaptors/searcher.rb', line 10

def adaptor
  @adaptor
end

#paginationObject (readonly)

Returns the value of attribute pagination.



10
11
12
# File 'lib/ledger_sync/adaptors/searcher.rb', line 10

def pagination
  @pagination
end

#queryObject (readonly)

Returns the value of attribute query.



10
11
12
# File 'lib/ledger_sync/adaptors/searcher.rb', line 10

def query
  @query
end

#requestObject (readonly)

Returns the value of attribute request.



10
11
12
# File 'lib/ledger_sync/adaptors/searcher.rb', line 10

def request
  @request
end

Instance Method Details

#next_searcherObject

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/ledger_sync/adaptors/searcher.rb', line 28

def next_searcher
  raise NotImplementedError
end

#previous_searcherObject

Raises:

  • (NotImplementedError)


32
33
34
# File 'lib/ledger_sync/adaptors/searcher.rb', line 32

def previous_searcher
  raise NotImplementedError
end

#resourcesObject

Raises:

  • (NotImplementedError)


36
37
38
# File 'lib/ledger_sync/adaptors/searcher.rb', line 36

def resources
  raise NotImplementedError
end

#searchObject



40
41
42
# File 'lib/ledger_sync/adaptors/searcher.rb', line 40

def search
  @search ||= success
end