Exception: Pin::SimpleError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/pin_up/pin_errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, message = nil) ⇒ SimpleError

Returns a new instance of SimpleError.



67
68
69
70
# File 'lib/pin_up/pin_errors.rb', line 67

def initialize(response, message=nil)
  @response = response
  @message = message || @response['error_description']
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



66
67
68
# File 'lib/pin_up/pin_errors.rb', line 66

def message
  @message
end

#responseObject

Returns the value of attribute response.



66
67
68
# File 'lib/pin_up/pin_errors.rb', line 66

def response
  @response
end

Instance Method Details

#to_sObject



72
73
74
# File 'lib/pin_up/pin_errors.rb', line 72

def to_s
  @message
end