Method: Azure::Storage::Common::Service::Serialization::ClassMethods#metadata_from_xml
- Defined in:
- lib/azure/storage/common/service/serialization.rb
permalink #metadata_from_xml(xml) ⇒ Object
[View source]
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/azure/storage/common/service/serialization.rb', line 111 def (xml) xml = slopify(xml) expect_node("Metadata", xml) = {} xml.children.each { || key = .name.downcase if .has_key? key [key] = [[key]] unless [key].respond_to? :push [key].push(.text) else [key] = .text end } end |