Exception: Wands::ResponseException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/wands/response_exception.rb

Overview

This exception is raised when the response from the server is not as expected.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response) ⇒ ResponseException

Returns a new instance of ResponseException.



8
9
10
11
# File 'lib/wands/response_exception.rb', line 8

def initialize(message, response)
  super(message)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



6
7
8
# File 'lib/wands/response_exception.rb', line 6

def response
  @response
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/wands/response_exception.rb', line 13

def to_s
  "#{super} from '#{response}'"
end