Sha256: 2e96b5c0e93496517593ca4e277afcad2ed80c0a3af264fe505c854a0a506d96
Contents?: true
Size: 581 Bytes
Versions: 1
Compression:
Stored size: 581 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.headers.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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
innate-2023.01.06 | lib/innate/response.rb |