class Oddb2xml::FirstbaseDownloader

Constants

BASE_URL

Public Class Methods

new(type = :orphan, options = {}) click to toggle source
# File lib/oddb2xml/downloader.rb, line 388
def initialize(type = :orphan, options = {})
  @url = BASE_URL + "/firstbase.xlsx"
end

Public Instance Methods

download() click to toggle source
# File lib/oddb2xml/downloader.rb, line 392
def download
  @file2save = File.join(DOWNLOADS, "firstbase.xlsx")
  report_download(@url, @file2save)
  begin
    download_as(@file2save, "w+")
    return File.expand_path(@file2save)
  rescue Timeout::Error, Errno::ETIMEDOUT
    retrievable? ? retry : raise
  ensure
    Oddb2xml.download_finished(@file2save, false)
  end
  File.expand_path(@file2save)
end