Exception: Gom::HttpError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_response, description) ⇒ HttpError

Returns a new instance of HttpError.



13
14
15
16
# File 'lib/gom/client.rb', line 13

def initialize(http_response, description)
  @response    = http_response
  @description = description
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



11
12
13
# File 'lib/gom/client.rb', line 11

def description
  @description
end

#responseObject (readonly)

Returns the value of attribute response.



11
12
13
# File 'lib/gom/client.rb', line 11

def response
  @response
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/gom/client.rb', line 18

def to_s
  "#{@response.code} #{@response.message} #{@description}"
end