Sha256: ca35c08451fd0a2e0b9ca61b57b583a9c4b2aa1951e2f388e9178c2c4d219935
Contents?: true
Size: 241 Bytes
Versions: 5
Compression:
Stored size: 241 Bytes
Contents
require 'open-uri' module Bukkit def self.download(filename, uri) begin File.open("#{filename}", "wb") do |file| file.write open("#{uri}").read end rescue Errno::ENOENT abort "ERROR: No internet connection." end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
bukkit-1.1.1 | lib/bukkit/download.rb |
bukkit-1.1.0 | lib/bukkit/download.rb |
bukkit-1.0.3 | lib/bukkit/download.rb |
bukkit-1.0.2 | lib/bukkit/download.rb |
bukkit-1.0.1 | lib/bukkit/download.rb |