Class: Fog::HP::DNS::Domain

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

Instance Method Summary collapse

Instance Method Details

#destroyObject



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

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

#recordsObject



23
24
25
26
27
28
29
30
# File 'lib/fog/hp/models/dns/domain.rb', line 23

def records
  @records ||= begin
    Fog::HP::DNS::Records.new({
      :service  => service,
      :domain   => self
    })
  end
end

#saveObject



32
33
34
# File 'lib/fog/hp/models/dns/domain.rb', line 32

def save
  identity ? update : create
end