Parent

Methods

Class/Module Index [+]

Quicksearch

Rack::Date

Public Class Methods

new(app, no_cache_control = nil, cache_control = nil) click to toggle source
# File lib/sinatra/rack_date.rb, line 26
def initialize(app, no_cache_control = nil, cache_control = nil)
  @app = app
end

Public Instance Methods

call(env) click to toggle source
# File lib/sinatra/rack_date.rb, line 30
def call(env)
  status, headers, body = @app.call(env)
  headers['Date'] = Time.new.httpdate if not headers['Date']
  [status, headers, body]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.