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 def acl(reload = false) policy = reload.is_a?(ACL::Policy) ? reload : nil expirable_memoize(reload) do self.class.acl(key, bucket.name, policy) if policy self.class.acl(key, bucket.name) end end