Class: Wee::GenericResponse

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

Constant Summary collapse

EXPIRE_OFFSET =

20 years

3600*24*365*20
EXPIRES_HEADER =
'Expires'.freeze
CONTENT_TYPE_HEADER =
'Content-Type'.freeze
CONTENT_TYPE =
'text/html; charset=UTF-8'.freeze

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ GenericResponse

Returns a new instance of GenericResponse.



16
17
18
19
20
# File 'lib/wee/response.rb', line 16

def initialize(*args)
  super
  self[EXPIRES_HEADER] ||= (Time.now + EXPIRE_OFFSET).rfc822
  self[CONTENT_TYPE_HEADER] = CONTENT_TYPE 
end