1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Underscore its an interface

This commit is contained in:
David Heinemeier Hansson 2017-07-01 12:10:11 +02:00
parent 97fe304af2
commit 4038bda96b

View file

@ -1,30 +1,39 @@
# 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 exists?(key)
raise NotImplementedError
end
def url(key)
raise NotImplementedError
end
def checksum(key)
raise NotImplementedError
end
def copy(from_key:, to_key:)
raise NotImplementedError
end
def move(from_key:, to_key:)
raise NotImplementedError
end
end