Class: Rack::PactBroker::AddCacheHeader
- Inherits:
-
Object
- Object
- Rack::PactBroker::AddCacheHeader
- Defined in:
- lib/rack/pact_broker/add_cache_header.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ AddCacheHeader
constructor
A new instance of AddCacheHeader.
Constructor Details
#initialize(app) ⇒ AddCacheHeader
Returns a new instance of AddCacheHeader.
4 5 6 |
# File 'lib/rack/pact_broker/add_cache_header.rb', line 4 def initialize app @app = app end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 |
# File 'lib/rack/pact_broker/add_cache_header.rb', line 8 def call(env) status, headers, body = @app.call(env) [status, { "Cache-Control" => "no-cache" }.merge(headers || {}), body] end |