Class: Imgproxy::UrlAdapters::ShrineS3
- Inherits:
-
Shrine
- Object
- Shrine
- Imgproxy::UrlAdapters::ShrineS3
show all
- Defined in:
- lib/imgproxy/url_adapters/shrine_s3.rb
Overview
Instance Method Summary
collapse
Methods inherited from Shrine
#initialize
Instance Method Details
#applicable?(image) ⇒ Boolean
11
12
13
|
# File 'lib/imgproxy/url_adapters/shrine_s3.rb', line 11
def applicable?(image)
super && image.storage.is_a?(::Shrine::Storage::S3)
end
|
#url(image) ⇒ Object
15
16
17
|
# File 'lib/imgproxy/url_adapters/shrine_s3.rb', line 15
def url(image)
"s3://#{image.storage.bucket.name}/#{image.id}"
end
|