Sha256: e950c71686add936e48c241264ca51c69bea4cbd54c726761d6a96fd84efa26f
Contents?: true
Size: 282 Bytes
Versions: 1
Compression:
Stored size: 282 Bytes
Contents
module Dl def self.download(url) session = Patron::Session.new puts "Downloading #{url}..." response = session.get url filename = response.url.split('/').pop puts "Downloaded to file #{filename}!" File.new(filename, 'w').write(response.body) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dl-0.1.0 | lib/dl/dl.rb |