Class: Rack::Timestamp

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/timestamp.rb,
lib/rack/timestamp/version.rb

Constant Summary collapse

VERSION =
'1.1.0'

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Timestamp

Returns a new instance of Timestamp.



6
7
8
# File 'lib/rack/timestamp.rb', line 6

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
# File 'lib/rack/timestamp.rb', line 10

def call(env)
  env['rack.timestamp'] = Time.now.httpdate
  @app.call(env)
end