Class: Rack::Lint::HijackWrapper

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Assertion
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-2.2.5/lib/rack/lint.rb

Constant Summary collapse

REQUIRED_METHODS =
[
  :read, :write, :read_nonblock, :write_nonblock, :flush, :close,
  :close_read, :close_write, :closed?
]

Instance Method Summary collapse

Methods included from Assertion

#assert

Constructor Details

#initialize(io) ⇒ HijackWrapper

Returns a new instance of HijackWrapper.



547
548
549
550
551
552
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-2.2.5/lib/rack/lint.rb', line 547

def initialize(io)
  @io = io
  REQUIRED_METHODS.each do |meth|
    assert("rack.hijack_io must respond to #{meth}") { io.respond_to? meth }
  end
end