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:
parent
97fe304af2
commit
4038bda96b
1 changed files with 9 additions and 0 deletions
|
@ -1,30 +1,39 @@
|
||||||
|
# Abstract class serving as an interface for concrete sites.
|
||||||
class ActiveFile::Site
|
class ActiveFile::Site
|
||||||
def initialize
|
def initialize
|
||||||
end
|
end
|
||||||
|
|
||||||
def upload(key, data)
|
def upload(key, data)
|
||||||
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
|
|
||||||
def download(key)
|
def download(key)
|
||||||
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete(key)
|
def delete(key)
|
||||||
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
|
|
||||||
def exists?(key)
|
def exists?(key)
|
||||||
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
|
|
||||||
def url(key)
|
def url(key)
|
||||||
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
|
|
||||||
def checksum(key)
|
def checksum(key)
|
||||||
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def copy(from_key:, to_key:)
|
def copy(from_key:, to_key:)
|
||||||
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
|
|
||||||
def move(from_key:, to_key:)
|
def move(from_key:, to_key:)
|
||||||
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue