Exception: OXR::ApiError

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

Overview

ApiError is raised when OXR encounters an error connecting to the Open Exchange Rates API server.

Instance Method Summary collapse

Instance Method Details

#descriptionObject



71
72
73
# File 'lib/oxr.rb', line 71

def description
  response['description']
end

#messageObject



67
68
69
# File 'lib/oxr.rb', line 67

def message
  cause.message
end

#responseObject



75
76
77
# File 'lib/oxr.rb', line 75

def response
  @response ||= JSON.parse cause.io.read
end