Class: Puppeteer::ProtocolStreamReader

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/protocol_stream_reader.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:, handle:) ⇒ ProtocolStreamReader

Returns a new instance of ProtocolStreamReader.



2
3
4
5
# File 'lib/puppeteer/protocol_stream_reader.rb', line 2

def initialize(client:, handle:)
  @client = client
  @handle = handle
end

Instance Method Details

#read_as_chunksObject



8
9
10
11
12
13
# File 'lib/puppeteer/protocol_stream_reader.rb', line 8

def read_as_chunks
  Enumerator.new do |out|
    io_read { |data| out << data }
    io_close
  end
end