Class: Tus::Storage::S3::Response
- Inherits:
-
Object
- Object
- Tus::Storage::S3::Response
- Defined in:
- lib/tus/storage/s3.rb
Instance Method Summary collapse
- #close ⇒ Object
- #each ⇒ Object
-
#initialize(chunks:, length:) ⇒ Response
constructor
A new instance of Response.
- #length ⇒ Object
Constructor Details
#initialize(chunks:, length:) ⇒ Response
Returns a new instance of Response.
274 275 276 277 |
# File 'lib/tus/storage/s3.rb', line 274 def initialize(chunks:, length:) @chunks = chunks @length = length end |
Instance Method Details
#close ⇒ Object
291 292 293 |
# File 'lib/tus/storage/s3.rb', line 291 def close chunks_fiber.resume(:close) if chunks_fiber.alive? end |
#each ⇒ Object
283 284 285 286 287 288 289 |
# File 'lib/tus/storage/s3.rb', line 283 def each return enum_for(__method__) unless block_given? while (chunk = chunks_fiber.resume) yield chunk end end |
#length ⇒ Object
279 280 281 |
# File 'lib/tus/storage/s3.rb', line 279 def length @length end |