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.
268 269 270 271 |
# File 'lib/tus/storage/s3.rb', line 268 def initialize(chunks:, length:) @chunks = chunks @length = length end |
Instance Method Details
#close ⇒ Object
285 286 287 |
# File 'lib/tus/storage/s3.rb', line 285 def close chunks_fiber.resume(:close) if chunks_fiber.alive? end |
#each ⇒ Object
277 278 279 280 281 282 283 |
# File 'lib/tus/storage/s3.rb', line 277 def each return enum_for(__method__) unless block_given? while (chunk = chunks_fiber.resume) yield chunk end end |
#length ⇒ Object
273 274 275 |
# File 'lib/tus/storage/s3.rb', line 273 def length @length end |