Class: Swa::S3::Bucket
Instance Attribute Summary
Attributes inherited from Resource
#aws_resource
Instance Method Summary
collapse
Methods inherited from Resource
#data, delegate, #initialize, list
Constructor Details
This class inherits a constructor from Swa::Resource
Instance Method Details
41
42
43
|
# File 'lib/swa/s3/bucket.rb', line 41
def delete
bucket.delete
end
|
11
12
13
|
# File 'lib/swa/s3/bucket.rb', line 11
def id
name
end
|
#object_versions(options = {}) ⇒ Object
37
38
39
|
# File 'lib/swa/s3/bucket.rb', line 37
def object_versions(options = {})
Swa::S3::ObjectVersion.list(aws_resource.object_versions(options))
end
|
#objects(options = {}) ⇒ Object
33
34
35
|
# File 'lib/swa/s3/bucket.rb', line 33
def objects(options = {})
Swa::S3::Object.list(aws_resource.objects(options))
end
|
#policy_data ⇒ Object
29
30
31
|
# File 'lib/swa/s3/bucket.rb', line 29
def policy_data
MultiJson.load(policy_json)
end
|
#policy_json ⇒ Object
25
26
27
|
# File 'lib/swa/s3/bucket.rb', line 25
def policy_json
bucket.policy.policy.read
end
|
15
16
17
|
# File 'lib/swa/s3/bucket.rb', line 15
def summary
name
end
|
21
22
23
|
# File 'lib/swa/s3/bucket.rb', line 21
def uri
"s3://#{bucket.name}"
end
|