Class: Aws::S3::Resource
- Inherits:
-
Object
- Object
- Aws::S3::Resource
- Defined in:
- lib/aws-sdk-s3/resource.rb
Actions collapse
Associations collapse
Instance Method Summary collapse
- #client ⇒ Client
-
#initialize(options = {}) ⇒ Resource
constructor
A new instance of Resource.
Constructor Details
Instance Method Details
#bucket(name) ⇒ Bucket
68 69 70 71 72 73 |
# File 'lib/aws-sdk-s3/resource.rb', line 68 def bucket(name) Bucket.new( name: name, client: @client ) end |
#buckets(options = {}) ⇒ Bucket::Collection
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/aws-sdk-s3/resource.rb', line 80 def buckets( = {}) batches = Enumerator.new do |y| batch = [] resp = @client.list_buckets() resp.data.buckets.each do |b| batch << Bucket.new( name: b.name, data: b, client: @client ) end y.yield(batch) end Bucket::Collection.new(batches) end |