Module: Imgproxy::Extensions::Shrine

Defined in:
lib/imgproxy/extensions/shrine.rb

Overview

Extension for Shrine::UploadedFile

Instance Method Summary collapse

Instance Method Details

#imgproxy_info_url(options = {}) ⇒ String

Returns imgproxy info URL for a Shrine::UploadedFile instance

Parameters:

Returns:

  • (String)

See Also:



23
24
25
26
# File 'lib/imgproxy/extensions/shrine.rb', line 23

def imgproxy_info_url(options = {})
  return options.info_url_for(self) if options.is_a?(Imgproxy::UrlBuilders::Info)
  Imgproxy.info_url_for(self, options)
end

#imgproxy_url(options = {}) ⇒ String

Returns imgproxy URL for a Shrine::UploadedFile instance

Parameters:

Returns:

  • (String)

See Also:



13
14
15
16
# File 'lib/imgproxy/extensions/shrine.rb', line 13

def imgproxy_url(options = {})
  return options.url_for(self) if options.is_a?(Imgproxy::UrlBuilders::Processing)
  Imgproxy.url_for(self, options)
end