Exception: Apiwha::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/apiwha/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Error

Returns a new instance of Error.



6
7
8
# File 'lib/apiwha/error.rb', line 6

def initialize(response)
  @reason = response
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



4
5
6
# File 'lib/apiwha/error.rb', line 4

def reason
  @reason
end

Instance Method Details

#messageObject Also known as: to_s



10
11
12
# File 'lib/apiwha/error.rb', line 10

def message
  "#{@reason}"
end