Class: AWS::S3::UploadedPartCollection

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/aws/s3/uploaded_part_collection.rb

Overview

Represents the collection of parts that have been uploaded for a given multipart upload. You can get an instance of this class by calling MultipartUpload#parts.

Examples:

Get the total size of the uploaded parts

upload.parts.inject(0) { |sum, part| sum + part.size }

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#uploadMultipartUpload (readonly)

Returns The upload to which the parts belong.

Returns:



34
35
36
# File 'lib/aws/s3/uploaded_part_collection.rb', line 34

def upload
  @upload
end

Instance Method Details

#[](number) ⇒ UploadedPart

Returns An object representing the part with the given part number.

Parameters:

  • number (Integer)

    The part number.

Returns:

  • (UploadedPart)

    An object representing the part with the given part number.



46
47
48
# File 'lib/aws/s3/uploaded_part_collection.rb', line 46

def [](number)
  UploadedPart.new(upload, number)
end