123456789_123456789_123456789_123456789_123456789_

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 =

    The semantics of these IO methods must be a best effort match to those of a normal Ruby IO or Socket object, using standard arguments and raising standard exceptions. Servers are encouraged to simply pass on real IO objects, although it is recognized that this approach is not directly compatible with HTTP/2.

    # File 'lib/rack/lint.rb', line 881
    [
      :read, :write, :<<, :flush, :close,
      :close_read, :close_write, :closed?
    ]

Class Method Summary

Constructor Details

.new(stream) ⇒ StreamWrapper

[ GitHub ]

  
# File 'lib/rack/lint.rb', line 888

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