class Aws::AsyncClientStubs::StubStream
Attributes
Public Class Methods
Source
# File lib/aws-sdk-core/async_client_stubs.rb, line 55 def initialize @state = :open end
Public Instance Methods
Source
# File lib/aws-sdk-core/async_client_stubs.rb, line 77 def close @state = :closed end
Source
# File lib/aws-sdk-core/async_client_stubs.rb, line 73 def closed? @state == :closed end
Source
# File lib/aws-sdk-core/async_client_stubs.rb, line 63 def data(bytes, options = {}) if options[:end_stream] @state = :closed else decoder = Aws::EventStream::Decoder.new event = decoder.decode_chunk(bytes).first @send_events << decoder.decode_chunk(event.payload.read).first end end