Class: AWS::S3::BucketVersionCollection

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

Overview

A collection of versioned objects for the entire bucket.

See Also:

Instance Attribute Summary collapse

Attributes included from PrefixedCollection

#prefix

Instance Method Summary collapse

Methods included from PrefixedCollection

#with_prefix

Constructor Details

#initialize(bucket, options = {}) ⇒ BucketVersionCollection

Returns a new instance of BucketVersionCollection.

Parameters:



31
32
33
34
# File 'lib/aws/s3/bucket_version_collection.rb', line 31

def initialize bucket, options = {}
  @bucket = bucket
  super
end

Instance Attribute Details

#bucketBucket (readonly)

Returns The bucket this collection belongs to.

Returns:

  • (Bucket)

    The bucket this collection belongs to.



37
38
39
# File 'lib/aws/s3/bucket_version_collection.rb', line 37

def bucket
  @bucket
end

Instance Method Details

#each(options = {}) {|object_version| ... } ⇒ Object

Yields once for each version in the bucket.

Yields:

  • (object_version)

Yield Parameters:

Returns:

  • nil



50
# File 'lib/aws/s3/bucket_version_collection.rb', line 50

def each options = {}, █ super; end

#latestObjectVersion

Returns the most recently created object version in the entire bucket.

Returns:

  • (ObjectVersion)

    Returns the most recently created object version in the entire bucket.



41
42
43
# File 'lib/aws/s3/bucket_version_collection.rb', line 41

def latest
  self.find{|version| true }
end