module AWS::S3::ACL::S3Object

Public Instance Methods

acl(reload = false) click to toggle source

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
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