Class: DownloadResult

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

Direct Known Subclasses

Fail, OK

Defined Under Namespace

Classes: Fail, OK

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#curlObject (readonly)

Returns the value of attribute curl.



25
26
27
# File 'lib/remote_image_fetch/download_result.rb', line 25

def curl
  @curl
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/remote_image_fetch/download_result.rb', line 31

def error?
  is_a?(Fail)
end

#http_statusObject



35
36
37
# File 'lib/remote_image_fetch/download_result.rb', line 35

def http_status
  curl.response_code
end

#ok?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/remote_image_fetch/download_result.rb', line 27

def ok?
  is_a?(OK)
end