Class: Forward::API::Resource::JSONify

Inherits:
Object
  • Object
show all
Defined in:
lib/forward/api/resource.rb

Instance Method Summary collapse

Instance Method Details

#response(resp) ⇒ Object



19
20
21
22
23
# File 'lib/forward/api/resource.rb', line 19

def response(resp)
    resp.response = JSON.parse(resp.response, symbolize_names: true)
  rescue JSON::ParserError
    Forward.logger.debug 'Unable to parse API response'
end