Sha256: 4714fdf1b466bf94a5edd8bc88bc7a1daae443f233fea48c747b61fe91de345d
Contents?: true
Size: 694 Bytes
Versions: 18
Compression:
Stored size: 694 Bytes
Contents
module Poms module Api # Response is an implementation-agnostic representation of an HTTP-response, # composing a HTTP status code, body and hash of headers. class Response # @return [Fixnum] attr_reader :code # @return [String] attr_reader :body # @return [Hash] attr_reader :headers def initialize(code, body, headers) @code = code.to_i @body = body.to_s @headers = headers.to_h freeze end def eql?(other) other.is_a?(self.class) && code == other.code && body == other.body && headers == other.headers end alias == eql? end end end
Version data entries
18 entries across 18 versions & 1 rubygems