Class: OpenStack::Swift::ChunkedConnectionWrapper
- Inherits:
-
Object
- Object
- OpenStack::Swift::ChunkedConnectionWrapper
- 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
- #eof! ⇒ Object
- #eof? ⇒ Boolean
-
#initialize(data, chunk_size) ⇒ ChunkedConnectionWrapper
constructor
A new instance of ChunkedConnectionWrapper.
- #read(foo) ⇒ Object
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
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 |