Sha256: b22cf51af07b54bb203fd469d057f8efa3942470ab3ad2c3537c216b048ee2fe
Contents?: true
Size: 580 Bytes
Versions: 12
Compression:
Stored size: 580 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 self.mime_type options[: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
12 entries across 12 versions & 1 rubygems