Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'open-uri'
- def download_image(url, dest)
- open(url) do |u|
- File.open(dest, "wb") { |f| f.write(u.read)}
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement