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/parsers/shared/get_network_ips.rb

29 lines
565 B
Ruby

module Fog
module Parsers
module Terremark
module Shared
class GetNetworkIps< Fog::Parsers::Base
def reset
@ip_address = {}
@response = { 'IpAddresses' => [] }
end
def end_element(name)
case name
when 'Name', 'Status', 'Server'
@ip_address[name.downcase] = value
when 'IpAddress'
@response['IpAddresses'] << @ip_address
@ip_address = {}
end
end
end
end
end
end
end