Class: Rack::Timestamp
- Inherits:
-
Object
- Object
- Rack::Timestamp
- Defined in:
- lib/rack/timestamp.rb,
lib/rack/timestamp/version.rb
Constant Summary collapse
- VERSION =
'1.1.0'
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Timestamp
constructor
A new instance of Timestamp.
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 |