Class: Puppeteer::ProtocolStreamReader
- Inherits:
-
Object
- Object
- Puppeteer::ProtocolStreamReader
- Defined in:
- lib/puppeteer/protocol_stream_reader.rb
Instance Method Summary collapse
-
#initialize(client:, handle:) ⇒ ProtocolStreamReader
constructor
A new instance of ProtocolStreamReader.
- #read_as_chunks ⇒ Object
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_chunks ⇒ Object
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 |