Sha256: 14436b616cbb16cd070223c34d5d9bad4bce1143cf71031f6aedc6b447735f25

Contents?: true

Size: 789 Bytes

Versions: 11

Compression:

Stored size: 789 Bytes

Contents

##
# This class is used to be sandbox of requests processing.
# @attr [Fixnum] 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
  # @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, @header, @body)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
em-midori-0.1.6.1 lib/midori/clean_room.rb
em-midori-0.1.6 lib/midori/clean_room.rb
em-midori-0.1.5.4 lib/em-midori/clean_room.rb
em-midori-0.1.5.3 lib/em-midori/clean_room.rb
em-midori-0.1.5.2 lib/em-midori/clean_room.rb
em-midori-0.1.5.1 lib/em-midori/clean_room.rb
em-midori-0.1.5 lib/em-midori/clean_room.rb
em-midori-0.1.4.1 lib/em-midori/clean_room.rb
em-midori-0.1.4 lib/em-midori/clean_room.rb
em-midori-0.1.3 lib/em-midori/clean_room.rb
em-midori-0.1.2 lib/em-midori/clean_room.rb