Sha256: 260abf005db3c2f790cf725771c3cbeeede75b7498962f761d45fe77c636493b
Contents?: true
Size: 542 Bytes
Versions: 6
Compression:
Stored size: 542 Bytes
Contents
module Pact class ResponseDecorator def initialize response @response = response end def to_json(options = {}) as_json.to_json(options) end def as_json options = {} to_hash end def to_hash hash = {} hash[:status] = response.status if response.specified?(:status) hash[:headers] = response.headers if response.specified?(:headers) hash[:body] = response.body if response.specified?(:body) hash end private attr_reader :response end end
Version data entries
6 entries across 6 versions & 1 rubygems