Exception: Workarea::Listrak::OauthError
- Defined in:
- lib/workarea/listrak/error.rb
Instance Attribute Summary collapse
-
#http_response ⇒ Object
readonly
Returns the value of attribute http_response.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(http_response) ⇒ OauthError
constructor
A new instance of OauthError.
Constructor Details
#initialize(http_response) ⇒ OauthError
Returns a new instance of OauthError.
8 9 10 11 |
# File 'lib/workarea/listrak/error.rb', line 8 def initialize(http_response) @http_response = http_response super(http_response.body) end |
Instance Attribute Details
#http_response ⇒ Object (readonly)
Returns the value of attribute http_response.
6 7 8 |
# File 'lib/workarea/listrak/error.rb', line 6 def http_response @http_response end |
Instance Method Details
#body ⇒ Object
13 14 15 |
# File 'lib/workarea/listrak/error.rb', line 13 def body @body ||= JSON.parse(http_response.body) rescue nil end |