Class: Fog::DNS::Dynect::Zones

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

Instance Method Summary collapse

Instance Method Details

#allObject



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

def all
  data = service.get_zone.body['data'].map do |zone|
    { :domain => zone }
  end
  load(data)
end

#get(zone_id) ⇒ Object



17
18
19
20
21
# File 'lib/fog/dynect/models/dns/zones.rb', line 17

def get(zone_id)
  new(service.get_zone('zone' => zone_id).body['data'])
rescue Excon::Errors::NotFound
  nil
end