module Shrine::Plugins::Cloudimage::FileMethods
Public Instance Methods
cloudimage_invalidate()
click to toggle source
# File lib/shrine/plugins/cloudimage.rb, line 41 def cloudimage_invalidate path = URI.parse(cloudimage_url).path cloudimage_client.invalidate_original(path) end
cloudimage_srcset(**options)
click to toggle source
# File lib/shrine/plugins/cloudimage.rb, line 32 def cloudimage_srcset(**options) cloudimage_client.path(url).to_srcset(**options) end
cloudimage_url(**options)
click to toggle source
# File lib/shrine/plugins/cloudimage.rb, line 28 def cloudimage_url(**options) cloudimage_client.path(url).to_url(**options) end
delete()
click to toggle source
Calls superclass method
# File lib/shrine/plugins/cloudimage.rb, line 36 def delete super cloudimage_invalidate if cloudimage_invalidate? end
Private Instance Methods
cloudimage_client()
click to toggle source
# File lib/shrine/plugins/cloudimage.rb, line 48 def cloudimage_client shrine_class.cloudimage_client end
cloudimage_invalidate?()
click to toggle source
# File lib/shrine/plugins/cloudimage.rb, line 52 def cloudimage_invalidate? shrine_class.opts[:cloudimage][:invalidate] end