Method: Azure::Storage::Common::Service::Serialization::ClassMethods#signed_identifiers_to_xml

Defined in:
lib/azure/storage/common/service/serialization.rb

#signed_identifiers_to_xml(signed_identifiers) ⇒ Object

[View source]

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/azure/storage/common/service/serialization.rb', line 62

def signed_identifiers_to_xml(signed_identifiers)
  builder = Nokogiri::XML::Builder.new(encoding: "utf-8") do |xml|
    xml.SignedIdentifiers {
      signed_identifiers.each do |identifier|
        xml.SignedIdentifier {
          xml.Id identifier.id
          xml.AccessPolicy {
            xml.Start identifier.access_policy.start
            xml.Expiry identifier.access_policy.expiry
            xml.Permission identifier.access_policy.permission
          }
        }
      end
    }
  end
  builder.to_xml
end