Sha256: 33aac7e4d50e47f983193f6a6f7cd46d531cec68d7922223d3ff7bf7961db62b
Contents?: true
Size: 471 Bytes
Versions: 17
Compression:
Stored size: 471 Bytes
Contents
# frozen_string_literal: true module Mock module Twilio class Response attr_accessor :status_code, :body, :headers def initialize(status_code, body, request, headers: nil) @status_code = status_code body = '{}' if !body || body.empty? @body = Mock::Twilio::Decorator.call(body, request) @headers = !headers ? {} : headers.to_hash end def to_s "[#{status_code}] #{body}" end end end end
Version data entries
17 entries across 17 versions & 1 rubygems