class Fog::DNS::Zerigo::Record
Public Class Methods
new(attributes={})
click to toggle source
Calls superclass method
Fog::Model::new
# File lib/fog/zerigo/models/dns/record.rb, line 25 def initialize(attributes={}) super end
Public Instance Methods
destroy()
click to toggle source
# File lib/fog/zerigo/models/dns/record.rb, line 29 def destroy requires :identity service.delete_host(identity) true end
save()
click to toggle source
# File lib/fog/zerigo/models/dns/record.rb, line 39 def save requires :zone, :type, :value options = {} options[:hostname] = name if name options[:notes] = description if description options[:priority] = priority if priority options[:ttl] = ttl if ttl if persisted? options[:host_type] = type options[:data] = value service.update_host(identity, options) else data = service.create_host(@zone.id, type, value, options) merge_attributes(data.body) end true end
zone()
click to toggle source
# File lib/fog/zerigo/models/dns/record.rb, line 35 def zone @zone end
Private Instance Methods
zone=(new_zone)
click to toggle source
# File lib/fog/zerigo/models/dns/record.rb, line 61 def zone=(new_zone) @zone = new_zone end