Sha256: 94a70e85765eb54940edb2fa0424d64a61c5ed61af82558787e53ea7ff2c8e16
Contents?: true
Size: 846 Bytes
Versions: 21
Compression:
Stored size: 846 Bytes
Contents
## # This class is used to be sandbox of requests processing. # @attr [Integer] status HTTP response code # @attr [Hash] header HTTP response header # @attr [Object] body HTTP response body. String could is accepted by default, but could leave for further process with +Midori::Middleware+ # @attr [Midori::Request] request HTTP request class Midori::CleanRoom attr_accessor :status, :header, :body, :request # Init a Cleanroom for running # @param [Midori::Request] request HTTP request def initialize(request) @status = 200 @header = Midori::Const::DEFAULT_HEADER.clone @body = '' @request = request end # Generate response from variables inside +Midori::CleanRoom+ # @return [Midori::Response] midori response def raw_response Midori::Response.new(status: @status, header: @header, body: @body) end end
Version data entries
21 entries across 21 versions & 2 rubygems