Module AWS::S3::ACL::S3Object
In: lib/aws/s3/acl.rb

Methods

acl  

Classes and Modules

Module AWS::S3::ACL::S3Object::ClassMethods

Public Instance methods

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)

[Source]

     # File lib/aws/s3/acl.rb, line 580
580:         def acl(reload = false)
581:           policy = reload.is_a?(ACL::Policy) ? reload : nil
582:           memoize(reload) do
583:             self.class.acl(key, bucket.name, policy) if policy
584:             self.class.acl(key, bucket.name)
585:           end
586:         end

[Validate]