Class: ChunkedConnectionWrapper
- Inherits:
-
Object
- Object
- ChunkedConnectionWrapper
- Defined in:
- lib/fog/rackspace/client.rb
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.
35 36 37 38 39 40 |
# File 'lib/fog/rackspace/client.rb', line 35 def initialize(data, chunk_size) @size = chunk_size if data.respond_to? :read @file = data end end |
Instance Method Details
#eof! ⇒ Object
47 48 49 |
# File 'lib/fog/rackspace/client.rb', line 47 def eof! @file.eof! end |
#eof? ⇒ Boolean
50 51 52 |
# File 'lib/fog/rackspace/client.rb', line 50 def eof? @file.eof? end |
#read(foo) ⇒ Object
42 43 44 45 46 |
# File 'lib/fog/rackspace/client.rb', line 42 def read(foo) if @file @file.read(@size) end end |