Class: Wee::GenericResponse

Inherits:
Response show all
Defined in:
lib/wee/response.rb

Direct Known Subclasses

RedirectResponse, RefreshResponse

Constant Summary collapse

EXPIRE_OFFSET =

20 years

3600*24*365*20

Constants inherited from Response

Response::DEFAULT_HEADER

Instance Attribute Summary

Attributes inherited from Response

#content, #header, #status

Instance Method Summary collapse

Methods inherited from Response

#<<, #content_type, #content_type=, #cookies, #cookies?

Constructor Details

#initialize(mime_type = 'text/html', content = '') ⇒ GenericResponse

Returns a new instance of GenericResponse.



42
43
44
45
# File 'lib/wee/response.rb', line 42

def initialize(mime_type = 'text/html', content='')
  super
  @header['Expires'] = (Time.now + EXPIRE_OFFSET).rfc822
end