blob: 260b84ab88fb6fb25b3ef1619987c34288df575a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# Abstract class serving as an interface for concrete sites.
class ActiveFile::Site
def self.configure(site, **options)
begin
require "active_file/site/#{site.to_s.downcase}_site"
ActiveFile::Site.const_get(:"#{site}Site").new(**options)
end
end
def upload(key, io)
raise NotImplementedError
end
def download(key)
raise NotImplementedError
end
def delete(key)
raise NotImplementedError
end
def exist?(key)
raise NotImplementedError
end
def url(key, expires_in: nil)
raise NotImplementedError
end
def bytesize(key)
raise NotImplementedError
end
def checksum(key)
raise NotImplementedError
end
end
|