Class: Rackables::ResponseHeaders
- Inherits:
-
Object
- Object
- Rackables::ResponseHeaders
- Defined in:
- lib/rackables/response_headers.rb
Overview
Allows you to tap into the response headers. Yields a Rack::Utils::HeaderHash of current response headers to the block. Example:
use Rackables::ResponseHeaders do |headers|
headers['X-Foo'] = 'bar'
headers.delete('X-Baz')
end
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, &block) ⇒ ResponseHeaders
constructor
A new instance of ResponseHeaders.
Constructor Details
#initialize(app, &block) ⇒ ResponseHeaders
Returns a new instance of ResponseHeaders.
13 14 15 16 |
# File 'lib/rackables/response_headers.rb', line 13 def initialize(app, &block) @app = app @block = block end |