Exception: ConcurrentDownloader::DownloadError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/concurrent_downloader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(queue_item, response, downloader_id) ⇒ DownloadError

Returns a new instance of DownloadError.



44
45
46
47
48
49
50
# File 'lib/concurrent_downloader.rb', line 44

def initialize(queue_item, response, downloader_id)
  @queue_item = queue_item
  @response = response
  @downloader_id = downloader_id

  super "There was a download error: #{@queue_item[:method].upcase} #{@queue_item[:path]}: #{@response.status}"
end

Instance Attribute Details

#downloader_idObject (readonly)

Returns the value of attribute downloader_id.



39
40
41
# File 'lib/concurrent_downloader.rb', line 39

def downloader_id
  @downloader_id
end

#queue_itemObject (readonly)

Returns the value of attribute queue_item.



39
40
41
# File 'lib/concurrent_downloader.rb', line 39

def queue_item
  @queue_item
end

#responseObject (readonly)

Returns the value of attribute response.



39
40
41
# File 'lib/concurrent_downloader.rb', line 39

def response
  @response
end