Exception: ConcurrentDownloader::DownloadError
- Inherits:
-
StandardError
- Object
- StandardError
- ConcurrentDownloader::DownloadError
- Defined in:
- lib/concurrent_downloader.rb
Instance Attribute Summary collapse
-
#downloader_id ⇒ Object
readonly
Returns the value of attribute downloader_id.
-
#queue_item ⇒ Object
readonly
Returns the value of attribute queue_item.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(queue_item, response, downloader_id) ⇒ DownloadError
constructor
A new instance of DownloadError.
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_id ⇒ Object (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_item ⇒ Object (readonly)
Returns the value of attribute queue_item.
39 40 41 |
# File 'lib/concurrent_downloader.rb', line 39 def queue_item @queue_item end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
39 40 41 |
# File 'lib/concurrent_downloader.rb', line 39 def response @response end |