Class: RAWS::S3::ACL::Owner
- Inherits:
-
Object
- Object
- RAWS::S3::ACL::Owner
- Defined in:
- lib/raws/s3/acl.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
(also: #display_name)
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(owner) ⇒ Owner
constructor
A new instance of Owner.
- #to_xml ⇒ Object
Constructor Details
#initialize(owner) ⇒ Owner
Returns a new instance of Owner.
7 8 9 |
# File 'lib/raws/s3/acl.rb', line 7 def initialize(owner) @id, @name = owner['ID'], owner['DisplayName'] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/raws/s3/acl.rb', line 3 def id @id end |
#name ⇒ Object Also known as: display_name
Returns the value of attribute name.
3 4 5 |
# File 'lib/raws/s3/acl.rb', line 3 def name @name end |
Instance Method Details
#to_xml ⇒ Object
11 12 13 14 15 16 |
# File 'lib/raws/s3/acl.rb', line 11 def to_xml '<Owner>' << "<ID>#{@id}</ID>" << "<DisplayName>#{@name}</DisplayName>" << '</Owner>' end |