Class: AWS::S3::UploadedPart

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/s3/uploaded_part.rb

Overview

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

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

#part_numberInteger (readonly)



30
31
32
# File 'lib/aws/s3/uploaded_part.rb', line 30

def part_number
  @part_number
end

#uploadMultipartUpload (readonly)



27
28
29
# File 'lib/aws/s3/uploaded_part.rb', line 27

def upload
  @upload
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



39
40
41
42
43
# 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

#etagString



59
60
61
# File 'lib/aws/s3/uploaded_part.rb', line 59

def etag
  get_attribute(:etag)
end

#last_modifiedDateTime



54
55
56
# File 'lib/aws/s3/uploaded_part.rb', line 54

def last_modified
  get_attribute(:last_modified)
end

#sizeInteger



48
49
50
# File 'lib/aws/s3/uploaded_part.rb', line 48

def size
  get_attribute(:size)
end