class EtFakeCcd::DocumentStoreService
Public Class Methods
find_by_id(id)
click to toggle source
# File lib/et_fake_ccd/document_store_service.rb, line 10 def self.find_by_id(id) instance.find_by_id(id) end
find_file_by_id(id)
click to toggle source
# File lib/et_fake_ccd/document_store_service.rb, line 14 def self.find_file_by_id(id) instance.find_file_by_id(id) end
store_file(filename:, type:, file:, classification:)
click to toggle source
# File lib/et_fake_ccd/document_store_service.rb, line 6 def self.store_file(filename:, type:, file:, classification:) instance.store_file(filename: filename, type: type, file: file, classification: classification) end
Public Instance Methods
adapter()
click to toggle source
# File lib/et_fake_ccd/document_store_service.rb, line 30 def adapter @adapter ||= InMemoryAdapter.new end
find_by_id(id)
click to toggle source
# File lib/et_fake_ccd/document_store_service.rb, line 22 def find_by_id(id) adapter.fetch_by_id(id) end
find_file_by_id(id)
click to toggle source
# File lib/et_fake_ccd/document_store_service.rb, line 26 def find_file_by_id(id) adapter.fetch_file_by_id(id) end
store_file(filename:, type:, file:, classification:)
click to toggle source
# File lib/et_fake_ccd/document_store_service.rb, line 18 def store_file(filename:, type:, file:, classification:) adapter.store(filename: filename, type: type, file: file, classification: classification) end