Class: Innate::Response

Inherits:
Rack::Response
  • Object
show all
Includes:
Optioned
Defined in:
/home/manveru/github/ramaze/ramaze.net/tmp/git/innate/lib/innate/response.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods included from Optioned

included, #options

Class Method Details

+ (Object) mime_type



10
11
12
# File '/home/manveru/github/ramaze/ramaze.net/tmp/git/innate/lib/innate/response.rb', line 10

def self.mime_type
  options[:headers]['Content-Type'] || 'text/html'
end

Instance Method Details

- (Object) finish



22
23
24
25
26
# File '/home/manveru/github/ramaze/ramaze.net/tmp/git/innate/lib/innate/response.rb', line 22

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

- (Object) reset



14
15
16
17
18
19
20
# File '/home/manveru/github/ramaze/ramaze.net/tmp/git/innate/lib/innate/response.rb', line 14

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