Sha256: dc8de54ecb25dba30206af46e7e9fcfad8041a81f7791dfd8061d94e32c25508
Contents?: true
Size: 503 Bytes
Versions: 3
Compression:
Stored size: 503 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 = {} 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
3 entries across 3 versions & 1 rubygems