Class: Rack::ContentLengthWithExclusions
- Inherits:
-
ContentLength
- Object
- ContentLength
- Rack::ContentLengthWithExclusions
- Defined in:
- lib/streamlog/content_length_with_exclusions.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ ContentLengthWithExclusions
constructor
A new instance of ContentLengthWithExclusions.
Constructor Details
#initialize(app, options = {}) ⇒ ContentLengthWithExclusions
Returns a new instance of ContentLengthWithExclusions.
3 4 5 6 7 |
# File 'lib/streamlog/content_length_with_exclusions.rb', line 3 def initialize(app, = {}) @app = app @exclude = [:exclude] end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/streamlog/content_length_with_exclusions.rb', line 9 def call(env) if @exclude && @exclude.call(env) @app.call(env) else super(env) end end |