Sha256: 4af670c00724da2b62d4f77a3af7970bba7b01032950f6d21c1cc4edc7f683be

Contents?: true

Size: 204 Bytes

Versions: 1

Compression:

Stored size: 204 Bytes

Contents

module Dl
  def self.download(url)
    session = Patron::Session.new

    response = session.get url
    filename = response.url.split('/').pop

    File.new(filename, 'w').write(response.body)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dl-0.0.3 lib/dl/dl.rb