Sha256: 3ae94bd91c6ab3ef62e81d5b6d1f729686afddcefedbf01aca1a4e23da08d0b9

Contents?: true

Size: 493 Bytes

Versions: 14

Compression:

Stored size: 493 Bytes

Contents

module Innate
  class Response < Rack::Response
    include Optioned

    options.dsl do
      o "Default headers, will not override headers already set",
        :headers, {'Content-Type' => 'text/html'}
    end

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

    def finish
      options.headers.each{|key, value| self[key] ||= value }
      Current.session.flush(self)
      super
    end
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
manveru-innate-2009.05 lib/innate/response.rb
manveru-innate-2009.06.12 lib/innate/response.rb
manveru-innate-2009.06 lib/innate/response.rb
manveru-innate-2009.07 lib/innate/response.rb
rjspotter-innate-2009.06.29 lib/innate/response.rb
rjspotter-innate-2009.06.30 lib/innate/response.rb
rjspotter-innate-2009.06.31 lib/innate/response.rb
innate-2010.03 lib/innate/response.rb
innate-2010.01 lib/innate/response.rb
innate-2009.10 lib/innate/response.rb
innate-2009.07 lib/innate/response.rb
innate-2009.05 lib/innate/response.rb
innate-2009.06.12 lib/innate/response.rb
innate-2009.06 lib/innate/response.rb