# File lib/download_quizzes.rb, line 32 def download(file, todir = '.') begin puts "Downloading file #{file} from #{@address}" c = open("http://#{@address}/#{file}").read Dir.mkdir(todir) if not File.directory?(todir) f = open("#{todir}/#{file}", 'wb') f.puts c f.close rescue => e if not File.exists?(fullfile) $stderr.puts "Could not download file #{file} form #{@address}." $stderr.puts e.to_s end end end