Class: Seahorse::Client::NetHttp::Patches::RequestPatches::RequestIO Private

Inherits:
Object
  • Object
show all
Defined in:
lib/seahorse/client/net_http/patches.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.custom_stream(src, dst, chunk_size) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



54
55
56
57
58
59
60
61
# File 'lib/seahorse/client/net_http/patches.rb', line 54

def self.custom_stream(src, dst, chunk_size)
  copied = 0
  while (chunk = src.read(chunk_size))
    dst.write(chunk)
    copied += chunk.bytesize
  end
  copied
end