class Fog::DNS::Dnsimple::Record
Public Class Methods
new(attributes = {})
click to toggle source
Calls superclass method
# File lib/fog/dnsimple/models/dns/record.rb, line 18 def initialize(attributes = {}) super end
Public Instance Methods
destroy()
click to toggle source
# File lib/fog/dnsimple/models/dns/record.rb, line 22 def destroy service.delete_record(zone.id, identity) true end
save()
click to toggle source
# File lib/fog/dnsimple/models/dns/record.rb, line 31 def save requires :name, :type, :value options = {} options[:ttl] = ttl if ttl # decide whether its a new record or update of an existing if id.nil? data = service.create_record(zone.id, name, type, value, options) else options[:name] = name if name options[:content] = value if value options[:type] = type if type data = service.update_record(zone.id, id, options) end merge_attributes(data.body["data"]) true end
zone()
click to toggle source
# File lib/fog/dnsimple/models/dns/record.rb, line 27 def zone @zone end
Private Instance Methods
zone=(new_zone)
click to toggle source
# File lib/fog/dnsimple/models/dns/record.rb, line 52 def zone=(new_zone) @zone = new_zone end