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



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

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

#get(zone_id_or_domain) ⇒ Object



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

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