Files
danbooru/app/logical/storage_manager/null.rb
evazion f593828bb9 storage manager: refactor base_dir option.
Fix it so the `base_dir` option is only required by subclasses that
actually use it. The StorageManager::Mirror class doesn't use it.
2021-10-29 07:14:21 -05:00

20 lines
309 B
Ruby

# A null StorageManager that doesn't store files at all. Used for testing or
# disabling backups.
class StorageManager::Null < StorageManager
def initialize
super(base_url: nil)
end
def store(io, path)
# no-op
end
def delete(path)
# no-op
end
def open(path)
# no-op
end
end