class AnalogBridge::Response
Attributes
response[R]
Public Class Methods
new(response)
click to toggle source
# File lib/analogbridge/response.rb, line 7 def initialize(response) @response = response end
Public Instance Methods
parse()
click to toggle source
# File lib/analogbridge/response.rb, line 11 def parse JSON.parse(response, object_class: ResponseObject) rescue JSON::ParserError => error ResponseObject.new(error: error, content: "") end