Class: Rack::Lint::Wrapper::StreamWrapper
Do not use. This class is for internal use only.
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Forwardable
|
|
| Inherits: | Object |
| Defined in: | lib/rack/lint.rb |
Constant Summary
-
REQUIRED_METHODS =
# File 'lib/rack/lint.rb', line 976
The semantics of these
IOmethods must be a best effort match to those of a normal RubyIOorSocketobject, using standard arguments and raising standard exceptions. Servers may simply pass on realIOobjects to the Streaming Body. In some cases (e.g. when usingtransfer-encodingor HTTP/2+), the server may need to provide a wrapper that implements the required methods, in order to provide the correct semantics.[ :read, :write, :<<, :flush, :close, :close_read, :close_write, :closed? ]
Class Method Summary
- .new(stream) ⇒ StreamWrapper constructor
Constructor Details
.new(stream) ⇒ StreamWrapper
# File 'lib/rack/lint.rb', line 983
def initialize(stream) @stream = stream REQUIRED_METHODS.each do |method_name| raise LintError, "Stream must respond to #{method_name}" unless stream.respond_to?(method_name) end end