22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/fog/zerigo/parsers/dns/get_zone.rb', line 22
def end_element(name)
if (@in_hosts)
case name
when 'id', 'zone-id'
@host[name] = value.to_i
when 'priority', 'ttl'
@host[name] = value.to_i if value
when 'data', 'fqdn', 'host-type', 'hostname', 'notes', 'zone-id', 'created-at', 'updated-at'
@host[name] = value
when 'host'
@hosts << @host
@host = {}
when 'hosts'
@response[name] = @hosts
@in_hosts = false
end
else
case name
when 'default-ttl', 'id', 'nx-ttl', 'hosts-count'
@response[name] = value.to_i
when 'created-at', 'custom-nameservers', 'custom-ns', 'domain', 'hostmaster', 'notes', 'ns1', 'ns-type', 'slave-nameservers', 'tag-list', 'updated-at', 'hosts', 'axfr-ips', 'restrict-axfr'
@response[name] = value
end
end
end
|