Class: Awsum::S3::Bucket
Instance Attribute Summary collapse
-
#creation_date ⇒ Object
readonly
Returns the value of attribute creation_date.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#delete ⇒ Object
Delete this Bucket.
-
#delete! ⇒ Object
Delete this Bucket, recursively deleting all keys first.
-
#initialize(s3, name, creation_date = nil) ⇒ Bucket
constructor
A new instance of Bucket.
Constructor Details
#initialize(s3, name, creation_date = nil) ⇒ Bucket
Returns a new instance of Bucket.
6 7 8 9 10 |
# File 'lib/s3/bucket.rb', line 6 def initialize(s3, name, creation_date = nil) @s3 = s3 @name = name @creation_date = creation_date end |
Instance Attribute Details
#creation_date ⇒ Object (readonly)
Returns the value of attribute creation_date.
4 5 6 |
# File 'lib/s3/bucket.rb', line 4 def creation_date @creation_date end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/s3/bucket.rb', line 4 def name @name end |
Instance Method Details
#delete ⇒ Object
Delete this Bucket
13 14 15 |
# File 'lib/s3/bucket.rb', line 13 def delete @s3.delete_bucket(@name) end |
#delete! ⇒ Object
Delete this Bucket, recursively deleting all keys first
18 19 20 21 22 23 |
# File 'lib/s3/bucket.rb', line 18 def delete! @s3.keys(@name).each do |key| key.delete end delete end |