Class: RAWS::S3::ACL::Email

Inherits:
Grant
  • Object
show all
Defined in:
lib/raws/s3/acl.rb

Instance Attribute Summary collapse

Attributes inherited from Grant

#permission

Instance Method Summary collapse

Constructor Details

#initialize(email, permission) ⇒ Email

Returns a new instance of Email.



55
56
57
58
# File 'lib/raws/s3/acl.rb', line 55

def initialize(email, permission)
  super(permission)
  @email = email
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



53
54
55
# File 'lib/raws/s3/acl.rb', line 53

def email
  @email
end

Instance Method Details

#to_xmlObject



60
61
62
63
64
65
66
67
68
69
# File 'lib/raws/s3/acl.rb', line 60

def to_xml
  '<Grant>' <<
    '<Grantee' <<
    ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' <<
    ' xsi:type="AmazonCustomerByEmail">' <<
      "<EmailAddress>#{@email}</EmailAddress>" <<
    '</Grantee>' <<
    super <<
  '</Grant>'
end