Class: Fog::AWS::S3::Buckets
- Inherits:
-
Collection
- Object
- Collection
- Fog::AWS::S3::Buckets
- Defined in:
- lib/fog/aws/models/s3/buckets.rb
Instance Method Summary collapse
Methods inherited from Collection
#initialize, #inspect, #update_attributes
Constructor Details
This class inherits a constructor from Fog::Collection
Instance Method Details
#all ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fog/aws/models/s3/buckets.rb', line 11 def all data = connection.get_service.body owner = Fog::AWS::S3::Owner.new(data.delete('Owner').merge!(:connection => connection)) buckets = [] data['Buckets'].each do |bucket| buckets << Fog::AWS::S3::Bucket.new({ :connection => connection, :owner => owner }.merge!(bucket)) end buckets end |
#create(attributes = {}) ⇒ Object
24 25 26 27 28 |
# File 'lib/fog/aws/models/s3/buckets.rb', line 24 def create(attributes = {}) bucket = new(attributes) bucket.save bucket end |