lib/s3/right_s3.rb
# A bucket or a key the grantee has an access to.
A bucket or a key the grantee has an access to.
A bucket or a key the grantee has an access to .
def to_xml   
        id_str = case @id
                 when /^http/ then "<URI>#{@id}</URI>"
                 when /@/     then "<EmailAddress>#{@id}</EmailAddress>"
                 else              "<ID>#{@id}</ID>"
                 end
        grants = ''
        @perms.each do |perm|
          grants << "<Grant>"    +
                    "<Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
                      "xsi:type=\"#{type}\">#{id_str}</Grantee>" +
                    "<Permission>#{perm}</Permission>" +
                    "</Grant>"
        end
        grants
      end
def to_xml id_str = case @id when / ^http / then "<URI>#{@id}</URI>" when / @ / then "<EmailAddress>#{@id}</EmailAddress>" else "<ID>#{@id}</ID>" end grants = '' @perms . each do | perm | grants << "<Grant>" + "<Grantee xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " + "xsi:type=\"#{type}\">#{id_str}</Grantee>" + "<Permission>#{perm}</Permission>" + "</Grant>" end grants end
A bucket or a key the grantee has an access to.
A bucket or a key the grantee has an access to .
# :nodoc: