| Module | AWS::S3::ACL::S3Object |
| In: |
lib/aws/s3/acl.rb
|
The acl method returns and updates the acl for a given s3 object.
# Fetch a the object object = S3Object.find 'kiss.jpg', 'marcel' # Add a grant to the object's object.acl.grants << some_grant # Write the changes to the policy object.acl(object.acl)
# File lib/aws/s3/acl.rb, line 580
580: def acl(reload = false)
581: policy = reload.is_a?(ACL::Policy) ? reload : nil
582: expirable_memoize(reload) do
583: self.class.acl(key, bucket.name, policy) if policy
584: self.class.acl(key, bucket.name)
585: end
586: end