Class: Fog::DNS::Rage4::Zone

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

Instance Method Summary collapse

Instance Method Details

#destroyObject



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

def destroy
  service.delete_domain(id)
  true
end

#nameserversObject



26
27
28
29
30
31
# File 'lib/fog/rage4/models/dns/zone.rb', line 26

def nameservers
  [
   "ns1.r4ns.com",
   "ns2.r4ns.com",
  ]
end

#recordsObject



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

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

#saveObject



33
34
35
36
37
38
# File 'lib/fog/rage4/models/dns/zone.rb', line 33

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