Sha256: 7cf63565026290fde1f1ba2d53fd289aeb05c85677be9ccac48991414bb501e3
Contents?: true
Size: 642 Bytes
Versions: 20
Compression:
Stored size: 642 Bytes
Contents
module Billy class RequestLog attr_reader :requests def initialize @requests = [] end def reset @requests = [] end def record(method, url, headers, body) return unless Billy.config.record_requests request = { status: :inflight, handler: nil, method: method, url: url, headers: headers, body: body } @requests.push(request) request end def complete(request, handler) return unless Billy.config.record_requests request.merge! status: :complete, handler: handler end end end
Version data entries
20 entries across 20 versions & 1 rubygems