Class: Fog::DNS::DNSMadeEasy::Zone

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

Instance Method Summary collapse

Instance Method Details

#destroyObject



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

def destroy
  requires :identity
  service.delete_domain(identity)
  true
end

#recordsObject



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

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

#saveObject



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

def save
  requires :domain
  data = service.create_domain(domain).body
  self.identity = data['name']
  merge_attributes(data)
  true
end