Module: PicFisher::Downloader
- Defined in:
- lib/picfisher/downloader.rb
Overview
Downloads an image from an URL
Class Method Summary collapse
-
.download(url, output_path) ⇒ nil
Downloads an image from an URL.
Class Method Details
.download(url, output_path) ⇒ nil
Downloads an image from an URL
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/picfisher/downloader.rb', line 16 def self.download(url, output_path) PicFisher::Log.debug("Fishing #{url} to #{output_path}") begin _dowload(url, output_path) rescue OpenURI::HTTPError => e = "Failed to fish #{url}: #{e}" PicFisher::Log.error() raise PicFisher::Error, end end |