Class: Rack::PactBroker::AddVaryHeader
- Inherits:
-
Object
- Object
- Rack::PactBroker::AddVaryHeader
- Defined in:
- lib/rack/pact_broker/add_vary_header.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ AddVaryHeader
constructor
A new instance of AddVaryHeader.
Constructor Details
#initialize(app) ⇒ AddVaryHeader
Returns a new instance of AddVaryHeader.
29 30 31 |
# File 'lib/rack/pact_broker/add_vary_header.rb', line 29 def initialize app @app = app end |
Instance Method Details
#call(env) ⇒ Object
33 34 35 36 |
# File 'lib/rack/pact_broker/add_vary_header.rb', line 33 def call(env) status, headers, body = @app.call(env) [status, { "Vary" => "Accept" }.merge(headers || {}), body] end |