class Poto::ImageProxy
Public Instance Methods
cache(key, &set)
click to toggle source
# File lib/poto/image_proxy.rb, line 25 def cache(key, &set) Services::FileCache.new(path: settings.cache_path).cache(key, &set) end
download(uri)
click to toggle source
# File lib/poto/image_proxy.rb, line 29 def download(uri) Services::Download.new(file: Tempfile.new(settings.cache_path), uri: uri).call end
height()
click to toggle source
# File lib/poto/image_proxy.rb, line 21 def height params['height'].to_i end
resize(path, height, width)
click to toggle source
# File lib/poto/image_proxy.rb, line 33 def resize(path, height, width) Services::Resize.new(path: path, height: height, width: width).call end
src()
click to toggle source
# File lib/poto/image_proxy.rb, line 13 def src URI(params['src'].gsub(%r{\A\/\/}, 'http://')) end
width()
click to toggle source
# File lib/poto/image_proxy.rb, line 17 def width params['width'].to_i end