Exception: Greensky::Error

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

Instance Method Summary collapse

Constructor Details

#initialize(response = {}) ⇒ Error

Returns a new instance of Error.



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

def initialize(response={})
  @response = response
  super @response['message']
end

Instance Method Details

#codeObject



8
9
10
# File 'lib/greensky/error.rb', line 8

def code
  @response['code']
end