Class: Imgproxy::UrlAdapters::Shrine
- Inherits:
-
Object
- Object
- Imgproxy::UrlAdapters::Shrine
- Defined in:
- lib/imgproxy/url_adapters/shrine.rb
Overview
Instance Method Summary collapse
Instance Method Details
#applicable?(image) ⇒ Boolean
13 14 15 |
# File 'lib/imgproxy/url_adapters/shrine.rb', line 13 def applicable?(image) image.is_a?(::Shrine::UploadedFile) end |
#url(image) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/imgproxy/url_adapters/shrine.rb', line 17 def url(image) return s3_url(image) if use_s3_url(image) opts = {} opts[:host] = config.shrine_host if config.shrine_host image.url(**opts) end |