lib/fog/terremark/parsers/shared/get_organization.rb in fog-maestrodev-1.8.0.20130114204828 vs lib/fog/terremark/parsers/shared/get_organization.rb in fog-maestrodev-1.14.0.20130806165225
- old
+ new
@@ -1,31 +1,32 @@
module Fog
module Parsers
module Terremark
module Shared
- class GetOrganization < Fog::Parsers::Base
+ class GetOrganization < TerremarkParser
+ # include Fog::Terremark::Shared::Parser
def reset
@response = { 'Links' => [] }
end
def start_element(name, attributes)
super
case name
when 'Link'
- link = {}
+ link = extract_attributes(attributes)
until attributes.empty?
if attributes.first.is_a?(Array)
attribute = attributes.shift
link[attribute.first] = attribute.last
else
link[attributes.shift] = attributes.shift
end
end
@response['Links'] << link
when 'Org'
- org = {}
+ org = extract_attributes(attributes)
until attributes.empty?
if attributes.first.is_a?(Array)
attribute = attributes.shift
org[attribute.first] = attribute.last
else