Class: TerremarkParser
- Inherits:
-
Fog::Parsers::Base
- Object
- Fog::Parsers::Base
- TerremarkParser
- Defined in:
- lib/fog/terremark/parser.rb
Direct Known Subclasses
Fog::Parsers::Terremark::Shared::GetCatalog, Fog::Parsers::Terremark::Shared::GetCatalogItem, Fog::Parsers::Terremark::Shared::GetInternetServices, Fog::Parsers::Terremark::Shared::GetKeysList, Fog::Parsers::Terremark::Shared::GetNetworkIps, Fog::Parsers::Terremark::Shared::GetNodeServices, Fog::Parsers::Terremark::Shared::GetOrganization, Fog::Parsers::Terremark::Shared::GetOrganizations, Fog::Parsers::Terremark::Shared::GetPublicIps, Fog::Parsers::Terremark::Shared::GetTasksList, Fog::Parsers::Terremark::Shared::GetVappTemplate, Fog::Parsers::Terremark::Shared::GetVdc, Fog::Parsers::Terremark::Shared::InstantiateVappTemplate, Fog::Parsers::Terremark::Shared::InternetService, Fog::Parsers::Terremark::Shared::Network, Fog::Parsers::Terremark::Shared::NodeService, Fog::Parsers::Terremark::Shared::PublicIp, Fog::Parsers::Terremark::Shared::Task, Fog::Parsers::Terremark::Shared::Vapp
Instance Method Summary collapse
Instance Method Details
#extract_attributes(attributes_xml) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/fog/terremark/parser.rb', line 3 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] = attribute.value end else attribute = attributes_xml.shift attributes[attribute.localname] = attribute.value end end attributes end |