Class: VcloudDirectorParser
- Inherits:
-
Fog::Parsers::Base
- Object
- Fog::Parsers::Base
- VcloudDirectorParser
- Defined in:
- lib/fog/vcloud_director/compute.rb
Direct Known Subclasses
Fog::Parsers::Compute::VcloudDirector::Disks, Fog::Parsers::Compute::VcloudDirector::Metadata, Fog::Parsers::Compute::VcloudDirector::Network, Fog::Parsers::Compute::VcloudDirector::Vm, Fog::Parsers::Compute::VcloudDirector::VmCustomization, Fog::Parsers::Compute::VcloudDirector::VmNetwork, Fog::Parsers::Compute::VcloudDirector::Vms, Fog::Parsers::Compute::VcloudDirector::VmsByMetadata
Instance Method Summary collapse
Instance Method Details
#extract_attributes(attributes_xml) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fog/vcloud_director/compute.rb', line 5 def extract_attributes(attributes_xml) attributes = {} until attributes_xml.empty? if attributes_xml.first.is_a?(Array) until attributes_xml.first.empty? attribute = attributes_xml.first.shift attributes[attribute.localname.to_sym] = attribute.value end else attribute = attributes_xml.shift attributes[attribute.localname.to_sym] = attribute.value end end attributes end |