Sha256: 30215bdbbc3e3d40843175d515638792c6501bc93b98195e4510be90bebde586
Contents?: true
Size: 369 Bytes
Versions: 4
Compression:
Stored size: 369 Bytes
Contents
require "json" module DiscountNetwork class Response attr_reader :response def initialize(response) @response = response end def parse JSON.parse(response, object_class: ResponseObject) rescue JSON::ParserError => error ResponseObject.new(error: error, content: "") end end class ResponseObject < OpenStruct; end end
Version data entries
4 entries across 4 versions & 1 rubygems