Methods

AWS::S3::ACL::Bucket

Public Instance Methods

acl(reload = false) click to toggle source

The acl method returns and updates the acl for a given bucket.

# Fetch a bucket
bucket = Bucket.find 'marcel'

# Add a grant to the bucket's policy
bucket.acl.grants << some_grant

# Write the changes to the policy
bucket.acl(bucket.acl)
# File lib/aws/s3/acl.rb, line 529
def acl(reload = false)
  policy = reload.is_a?(ACL::Policy) ? reload : nil
  expirable_memoize(reload) do
    self.class.acl(name, policy) if policy
    self.class.acl(name)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.