Exception: Contacts::FetchingError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/contacts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ FetchingError

Returns a new instance of FetchingError.



5
6
7
8
# File 'lib/contacts.rb', line 5

def initialize(response)
  @response = response
  super "expected HTTPSuccess, got #{response.class} (#{response.code} #{response.message})"
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/contacts.rb', line 3

def response
  @response
end