Class: LedgerSync::Ledgers::Searcher

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

Direct Known Subclasses

TestLedger::Searcher

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mixins::SerializationMixin

#deserializer, included, #serializer

Methods included from Mixins::InferSerializerMixin

included

Methods included from Mixins::InferResourceClassMixin

included

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

#clientObject (readonly)

Returns the value of attribute client.



11
12
13
# File 'lib/ledger_sync/ledgers/searcher.rb', line 11

def client
  @client
end

#paginationObject (readonly)

Returns the value of attribute pagination.



11
12
13
# File 'lib/ledger_sync/ledgers/searcher.rb', line 11

def pagination
  @pagination
end

#queryObject (readonly)

Returns the value of attribute query.



11
12
13
# File 'lib/ledger_sync/ledgers/searcher.rb', line 11

def query
  @query
end

#requestObject (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_classObject



29
30
31
# File 'lib/ledger_sync/ledgers/searcher.rb', line 29

def deserializer_class
  @deserializer_class ||= self.class.inferred_deserializer_class
end

#next_searcherObject

Raises:

  • (NotImplementedError)


33
34
35
# File 'lib/ledger_sync/ledgers/searcher.rb', line 33

def next_searcher
  raise NotImplementedError
end

#previous_searcherObject

Raises:

  • (NotImplementedError)


37
38
39
# File 'lib/ledger_sync/ledgers/searcher.rb', line 37

def previous_searcher
  raise NotImplementedError
end

#resourcesObject

Raises:

  • (NotImplementedError)


41
42
43
# File 'lib/ledger_sync/ledgers/searcher.rb', line 41

def resources
  raise NotImplementedError
end

#searchObject



45
46
47
# File 'lib/ledger_sync/ledgers/searcher.rb', line 45

def search
  @search ||= success
end