Sha256: fc6d59b07f120a1b0c54e5c6499200c386d449cbc780efe82df9f57ae2642567
Contents?: true
Size: 392 Bytes
Versions: 8
Compression:
Stored size: 392 Bytes
Contents
# frozen_string_literal: true module Gupshup class Response attr_accessor :status_code, :body, :headers def initialize(status_code, body, headers: nil) @status_code = status_code body = '{}' if !body || body.empty? @body = JSON.parse(body) @headers = !headers ? {} : headers.to_hash end def to_s "[#{status_code}] #{body}" end end end
Version data entries
8 entries across 8 versions & 1 rubygems