Class: AWS::S3::BucketVersionCollection
- Inherits:
-
Object
- Object
- AWS::S3::BucketVersionCollection
- Defined in:
- lib/aws/s3/bucket_version_collection.rb
Overview
A collection of versioned objects for the entire bucket.
Instance Attribute Summary collapse
-
#bucket ⇒ Bucket
readonly
The bucket this collection belongs to.
Attributes included from PrefixedCollection
Instance Method Summary collapse
-
#each(options = {}) {|object_version| ... } ⇒ Object
Yields once for each version in the bucket.
-
#initialize(bucket, options = {}) ⇒ BucketVersionCollection
constructor
A new instance of BucketVersionCollection.
-
#latest ⇒ ObjectVersion
Returns the most recently created object version in the entire bucket.
Methods included from PrefixedCollection
Methods included from Core::Collection
#each_batch, #enum, #first, #in_groups_of, #page
Constructor Details
#initialize(bucket, options = {}) ⇒ BucketVersionCollection
Returns a new instance of BucketVersionCollection.
25 26 27 28 |
# File 'lib/aws/s3/bucket_version_collection.rb', line 25 def initialize bucket, = {} @bucket = bucket super end |
Instance Attribute Details
#bucket ⇒ Bucket (readonly)
Returns 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.
48 |
# File 'lib/aws/s3/bucket_version_collection.rb', line 48 def each = {}, █ super; end |
#latest ⇒ 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 |