2017-07-01 06:10:11 -04:00
|
|
|
# Abstract class serving as an interface for concrete sites.
|
2017-06-30 18:04:19 -04:00
|
|
|
class ActiveFile::Site
|
|
|
|
def initialize
|
|
|
|
end
|
|
|
|
|
2017-06-30 13:12:58 -04:00
|
|
|
def upload(key, data)
|
2017-07-01 06:10:11 -04:00
|
|
|
raise NotImplementedError
|
2017-06-30 13:12:58 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def download(key)
|
2017-07-01 06:10:11 -04:00
|
|
|
raise NotImplementedError
|
2017-06-30 13:12:58 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def delete(key)
|
2017-07-01 06:10:11 -04:00
|
|
|
raise NotImplementedError
|
2017-06-30 13:12:58 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def exists?(key)
|
2017-07-01 06:10:11 -04:00
|
|
|
raise NotImplementedError
|
2017-06-30 13:12:58 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def url(key)
|
2017-07-01 06:10:11 -04:00
|
|
|
raise NotImplementedError
|
2017-06-30 13:12:58 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def checksum(key)
|
2017-07-01 06:10:11 -04:00
|
|
|
raise NotImplementedError
|
2017-06-30 13:12:58 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
2017-07-01 06:10:22 -04:00
|
|
|
def copy(from:, to:)
|
2017-07-01 06:10:11 -04:00
|
|
|
raise NotImplementedError
|
2017-06-30 13:12:58 -04:00
|
|
|
end
|
|
|
|
|
2017-07-01 06:10:22 -04:00
|
|
|
def move(from:, to:)
|
2017-07-01 06:10:11 -04:00
|
|
|
raise NotImplementedError
|
2017-06-30 13:12:58 -04:00
|
|
|
end
|
2017-06-30 18:14:22 -04:00
|
|
|
end
|
2017-06-30 18:04:19 -04:00
|
|
|
|
2017-06-30 18:14:22 -04:00
|
|
|
module ActiveFile::Sites
|
2017-06-30 13:12:58 -04:00
|
|
|
end
|