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.
8 9 10 11 12 |
# File 'lib/awsum/s3/bucket.rb', line 8 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.
6 7 8 |
# File 'lib/awsum/s3/bucket.rb', line 6 def creation_date @creation_date end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/awsum/s3/bucket.rb', line 6 def name @name end |
Instance Method Details
#delete ⇒ Object
Delete this Bucket
15 16 17 |
# File 'lib/awsum/s3/bucket.rb', line 15 def delete @s3.delete_bucket(@name) end |
#delete! ⇒ Object
Delete this Bucket, recursively deleting all keys first
20 21 22 23 24 25 |
# File 'lib/awsum/s3/bucket.rb', line 20 def delete! @s3.keys(@name).each do |key| key.delete end delete end |