Class: AWS::S3::AccessControlList::Permission

Inherits:
Object
  • Object
show all
Includes:
AWS::S3::ACLObject
Defined in:
lib/aws/s3/access_control_list.rb

Overview

Represents the permission being granted in a Grant object. Typically you will not need to construct an instance of this class directly.

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AWS::S3::ACLObject

#element_name, included, #stag, #to_s, #to_xml, #valid?, #validate!, #validate_input

Constructor Details

#initialize(name) ⇒ Permission

Returns a new instance of Permission.



156
157
158
159
160
# File 'lib/aws/s3/access_control_list.rb', line 156

def initialize(name)
  raise "expected string or symbol" unless
    name.respond_to?(:to_str) or name.respond_to?(:to_sym)
  @name = name.to_sym
end

Instance Attribute Details

#nameObject (readonly)

The permission expressed as a symbol following Ruby conventions. For example, S3’s FULL_CONTROL permission will be returned as :full_control.



153
154
155
# File 'lib/aws/s3/access_control_list.rb', line 153

def name
  @name
end

Instance Method Details

#body_xmlObject



162
163
164
# File 'lib/aws/s3/access_control_list.rb', line 162

def body_xml
  name.to_s.upcase
end