lib/ledger_sync/adaptors/adaptor.rb in ledger_sync-1.3.4 vs lib/ledger_sync/adaptors/adaptor.rb in ledger_sync-1.3.5

- old
+ new

@@ -39,17 +39,15 @@ adaptor: self, resource: resource ) end - def searcher_for?(resource_type:) - searcher_klass_for(resource_type: resource_type) - rescue NameError - false + def searcher_for(resource_type:, query: '') + searcher_class_for(resource_type: resource_type).new(adaptor: self, query: query) end - def searcher_klass_for(resource_type:) + def searcher_class_for(resource_type:) base_module.const_get(LedgerSync::Util::StringHelpers.camelcase(resource_type.to_s))::Searcher end def url_for(*_args) raise NotImplementedError @@ -66,10 +64,10 @@ def self.base_operation_module_for(resource_class:) base_module.const_get("#{resource_class.resource_module_str}::Operations") end def self.config - @config ||= LedgerSync.adaptors.config_from_klass(klass: self) + @config ||= LedgerSync.adaptors.config_from_class(adaptor_class: self) end # These are attributes that must always be saved after the adaptor is called. # For example, the library will handle refreshing tokens that will need # to be saved back to the application layer for future use.