Class: Innate::Response
- Inherits:
-
Rack::Response
- Object
- Rack::Response
- Innate::Response
- Includes:
- Optioned
- Defined in:
- lib/innate/response.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Optioned
Class Method Details
.mime_type ⇒ Object
10 11 12 |
# File 'lib/innate/response.rb', line 10 def self.mime_type [:headers]['Content-Type'] || 'text/html' end |
Instance Method Details
#finish ⇒ Object
22 23 24 25 26 |
# File 'lib/innate/response.rb', line 22 def finish .headers.each{|key, value| self[key] ||= value } Current.session.flush(self) super end |
#reset ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/innate/response.rb', line 14 def reset self.status = 200 self.headers.delete('Content-Type') body.clear self.length = 0 self end |