class Sufia::ControlledVocabulary::Importer::Downloader
Public Class Methods
fetch(url, output)
click to toggle source
# File lib/sufia/controlled_vocabulary/importer/downloader.rb, line 7 def self.fetch(url, output) open(url) do |io| IO.copy_stream(io, output) end rescue OpenURI::HTTPError => e raise "Unable to download from #{url}\n#{e.message}: #{e.io.read}" end