Class: RemoteImageFetch::CurlError

Inherits:
Object
  • Object
show all
Defined in:
lib/remote_image_fetch/curl_error.rb

Overview

Wrap cURL response as if it’s an error

Instance Method Summary collapse

Constructor Details

#initialize(curl) ⇒ CurlError



4
5
6
# File 'lib/remote_image_fetch/curl_error.rb', line 4

def initialize(curl)
  @curl = curl
end

Instance Method Details

#messageObject



8
9
10
# File 'lib/remote_image_fetch/curl_error.rb', line 8

def message
  @curl.status
end

#to_sObject



12
13
14
# File 'lib/remote_image_fetch/curl_error.rb', line 12

def to_s
  message
end