Class: OpenStack::Swift::ChunkedConnectionWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/openstack/swift/connection.rb

Overview

used for PUT object with body_stream for http data see OpenStack::Connection::put_object

Instance Method Summary collapse

Constructor Details

#initialize(data, chunk_size) ⇒ ChunkedConnectionWrapper

Returns a new instance of ChunkedConnectionWrapper.



166
167
168
169
# File 'lib/openstack/swift/connection.rb', line 166

def initialize(data, chunk_size)
  @size = chunk_size
  @file = data
end

Instance Method Details

#eof!Object



175
176
177
# File 'lib/openstack/swift/connection.rb', line 175

def eof!
  @file.eof!
end

#eof?Boolean

Returns:

  • (Boolean)


178
179
180
# File 'lib/openstack/swift/connection.rb', line 178

def eof?
  @file.eof?
end

#read(foo) ⇒ Object



171
172
173
# File 'lib/openstack/swift/connection.rb', line 171

def read(foo)
  @file.read(@size)
end