Class: Fog::DNS::DNSimple::Zone

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/dnsimple/models/dns/zone.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



14
15
16
17
# File 'lib/fog/dnsimple/models/dns/zone.rb', line 14

def destroy
  service.delete_domain(identity)
  true
end

#nameserversObject



28
29
30
31
32
33
34
35
# File 'lib/fog/dnsimple/models/dns/zone.rb', line 28

def nameservers
  [
   "ns1.dnsimple.com",
   "ns2.dnsimple.com",
   "ns3.dnsimple.com",
   "ns4.dnsimple.com",
  ]
end

#recordsObject



19
20
21
22
23
24
25
26
# File 'lib/fog/dnsimple/models/dns/zone.rb', line 19

def records
  @records ||= begin
    Fog::DNS::DNSimple::Records.new(
      :zone       => self,
      :service => service
    )
  end
end

#saveObject



37
38
39
40
41
42
# File 'lib/fog/dnsimple/models/dns/zone.rb', line 37

def save
  requires :domain
  data = service.create_domain(domain).body["domain"]
  merge_attributes(data)
  true
end