Class: Fog::DNS::Zerigo::Zones

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/zerigo/models/dns/zones.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



12
13
14
15
# File 'lib/fog/zerigo/models/dns/zones.rb', line 12

def all(options = {})
  data = service.list_zones(options).body['zones']
  load(data)
end

#get(zone_id_or_domain) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/fog/zerigo/models/dns/zones.rb', line 17

def get(zone_id_or_domain)
  data = service.get_zone(zone_id_or_domain).body
  zone = new(data)
  zone.records.load(data['hosts'])
  zone
rescue Fog::Service::NotFound
  nil
end