Sha256: c0f8920bec90bb469306b10a504a4fb49fe8b0c836aa66a86046753c26fbb0fc

Contents?: true

Size: 402 Bytes

Versions: 3

Compression:

Stored size: 402 Bytes

Contents

module Innate

  # In order to reset the body contents we also need to reset the length set by
  # Response#write - until I can submit a patch to Rack and the next release we
  # just do this.

  class Response < Rack::Response
    attr_accessor :length

    def reset
      self.status = 200
      self.header.delete('Content-Type')
      body.clear
      self.length = 0
      self
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
manveru-innate-2009.02.06 lib/innate/response.rb
manveru-innate-2009.02.21 lib/innate/response.rb
manveru-innate-2009.02.25 lib/innate/response.rb