Class: RAWS::S3::ACL::ID
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Grant
Instance Method Summary collapse
-
#initialize(id, permission, name = nil) ⇒ ID
constructor
A new instance of ID.
- #to_xml ⇒ Object
Constructor Details
#initialize(id, permission, name = nil) ⇒ ID
Returns a new instance of ID.
34 35 36 37 |
# File 'lib/raws/s3/acl.rb', line 34 def initialize(id, , name=nil) super() @id, @name = id, name end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
32 33 34 |
# File 'lib/raws/s3/acl.rb', line 32 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
32 33 34 |
# File 'lib/raws/s3/acl.rb', line 32 def name @name end |
Instance Method Details
#to_xml ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/raws/s3/acl.rb', line 39 def to_xml '<Grant>' << '<Grantee' << ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' << ' xsi:type="CanonicalUser">' << "<ID>#{@id}</ID>" << (@name ? "<DisplayName>#{@name}</DisplayName>" : '') << '</Grantee>' << super << '</Grant>' end |