class Fog::DNS::Dynect::Zone

Public Class Methods

new(attributes={}) click to toggle source
Calls superclass method Fog::Model.new
# File lib/fog/dynect/models/dns/zone.rb, line 19
def initialize(attributes={})
  self.ttl  ||= 3600
  super
end

Public Instance Methods

destroy() click to toggle source
# File lib/fog/dynect/models/dns/zone.rb, line 24
def destroy
  requires :domain
  connection.delete_zone(domain)
  true
end
domain=(new_domain) click to toggle source
# File lib/fog/dynect/models/dns/zone.rb, line 31
def domain=(new_domain)
  attributes[:domain] = new_domain.split('/').last
end
nameservers() click to toggle source
# File lib/fog/dynect/models/dns/zone.rb, line 45
def nameservers
  raise 'nameservers Not Implemented'
end
publish() click to toggle source
# File lib/fog/dynect/models/dns/zone.rb, line 35
def publish
  requires :identity
  data = connection.put_zone(identity, 'publish' => true)
  true
end
records() click to toggle source
# File lib/fog/dynect/models/dns/zone.rb, line 41
def records
  @records ||= Fog::DNS::Dynect::Records.new(:zone => self, :connection => connection)
end
save() click to toggle source
# File lib/fog/dynect/models/dns/zone.rb, line 49
def save
  requires :domain, :email, :ttl
  data = connection.post_zone(email, ttl, domain).body['data']
  merge_attributes(data)
  true
end