Exception: CoinTools::ResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/cointools/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

#nice_message

Constructor Details

#initialize(response, message = nil) ⇒ ResponseError

Returns a new instance of ResponseError.



28
29
30
31
# File 'lib/cointools/errors.rb', line 28

def initialize(response, message = nil)
  super(message || "#{response.code} #{response.message}")
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



26
27
28
# File 'lib/cointools/errors.rb', line 26

def response
  @response
end