Class: AWS::S3::BucketVersionCollection
- Inherits:
-
Object
- Object
- AWS::S3::BucketVersionCollection
- Includes:
- Enumerable
- 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
Constructor Details
#initialize(bucket, options = {}) ⇒ BucketVersionCollection
Returns a new instance of BucketVersionCollection.
31 32 33 34 |
# File 'lib/aws/s3/bucket_version_collection.rb', line 31 def initialize bucket, = {} @bucket = bucket super end |
Instance Attribute Details
#bucket ⇒ Bucket (readonly)
Returns 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.
50 |
# File 'lib/aws/s3/bucket_version_collection.rb', line 50 def each = {}, █ super; end |
#latest ⇒ 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 |