Class: AWS::S3::BucketVersionCollection

Inherits:
Object
  • Object
show all
Includes:
PrefixAndDelimiterCollection
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

Attributes included from Core::Model

#config

Instance Method Summary collapse

Methods included from PrefixAndDelimiterCollection

#as_tree

Methods included from PrefixedCollection

#with_prefix

Methods included from Core::Collection::Limitable

#each_batch

Methods included from Core::Collection

#each_batch, #enum, #first, #in_groups_of, #page

Methods included from Core::Model

#client, #config_prefix, #inspect

Constructor Details

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

Returns a new instance of BucketVersionCollection.

Parameters:


25
26
27
28
# File 'lib/aws/s3/bucket_version_collection.rb', line 25

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.


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

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


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

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.


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

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