Class: RAWS::S3::ACL::Owner

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/raws/s3/acl.rb', line 3

def id
  @id
end

#nameObject 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_xmlObject



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