Latch::Storage::Memory
Inherits Latch::Storage / Reference / Object
In-memory storage backend for testing purposes. Files are stored in a hash and are lost when the process exits. This is useful for testing without hitting the filesystem or network.
Latch.configure do |settings|
settings.storages["cache"] = Latch::Storage::Memory.new
settings.storages["store"] = Latch::Storage::Memory.new
end
Constructors
Instance methods
base_url
SourceOpens the file at the given location and returns an IO for reading.
store
SourceUploads an IO to the given location (id) in the storage.