1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/lib/active_file/site.rb
2017-07-03 17:54:57 -04:00

45 lines
711 B
Ruby

# Abstract class serving as an interface for concrete sites.
class ActiveFile::Site
def initialize
end
def upload(key, data)
raise NotImplementedError
end
def download(key)
raise NotImplementedError
end
def delete(key)
raise NotImplementedError
end
def exist?(key)
raise NotImplementedError
end
def url(key)
raise NotImplementedError
end
def checksum(key)
raise NotImplementedError
end
def copy(from:, to:)
raise NotImplementedError
end
def move(from:, to:)
raise NotImplementedError
end
end
module ActiveFile::Sites
end
require "active_file/sites/disk_site"
require "active_file/sites/gcs_site"
require "active_file/sites/s3_site"