class AWS::S3::UploadedPart

Represents a part of a multipart upload that has been uploaded to S3.

@example Get the total size of the uploaded parts

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

Attributes

part_number[R]

@return [Integer] The part number.

upload[R]

@return [MultipartUpload] The upload to which this belongs.

Public Class Methods

new(upload, part_number, opts = {}) click to toggle source

@private

# File lib/aws/s3/uploaded_part.rb, line 33
def initialize(upload, part_number, opts = {})
  @upload = upload
  @part_number = part_number
  super
end

Public Instance Methods

==(other) click to toggle source
# File lib/aws/s3/uploaded_part.rb, line 39
def ==(other)
  other.kind_of?(UploadedPart) and
    other.upload == upload and
    other.part_number == part_number
end
Also aliased as: eql?
eql?(other) click to toggle source
Alias for: ==
etag() click to toggle source

@return [String] The ETag of the part.

# File lib/aws/s3/uploaded_part.rb, line 59
def etag
  get_attribute(:etag)
end
last_modified() click to toggle source

@return [DateTime] The time at which the part was last

modified.
# File lib/aws/s3/uploaded_part.rb, line 54
def last_modified
  get_attribute(:last_modified)
end
size() click to toggle source

@return [Integer] The size of the part as it currently

exists in S3.
# File lib/aws/s3/uploaded_part.rb, line 48
def size
  get_attribute(:size)
end