1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/terremark/parser.rb
Paul Thornthwaite 330a351ade Remove trailing blank lines
Done with `rubocop --auto-correct --only TrailingBlankLines`
2014-05-26 14:35:26 +01:00

18 lines
496 B
Ruby

class TerremarkParser < Fog::Parsers::Base
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
end