Class: Rack::Lint::HijackWrapper

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
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

Constructor Details

#initialize(io) ⇒ HijackWrapper

Returns a new instance of HijackWrapper.


537
538
539
540
541
542
# File 'lib/rack/lint.rb', line 537

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