class Fog::DNS::Linode::Record
Public Class Methods
new(attributes={})
click to toggle source
“PROTOCOL”:“”, “WEIGHT”:0, “PORT”:0,
Calls superclass method
# File lib/fog/linode/models/dns/record.rb, line 24 def initialize(attributes={}) super end
Public Instance Methods
destroy()
click to toggle source
# File lib/fog/linode/models/dns/record.rb, line 28 def destroy requires :identity, :zone service.domain_resource_delete(zone.id, identity) true end
save()
click to toggle source
# File lib/fog/linode/models/dns/record.rb, line 38 def save requires :type, :zone options = {} # * options<~Hash> # * weight<~Integer>: default: 5 # * port<~Integer>: default: 80 # * protocol<~String>: The protocol to append to an SRV record. Ignored on other record # types. default: udp options[:name] = name if name options[:priority] = priority if priority options[:target] = value if value options[:ttl_sec] = ttl if ttl response = unless identity service.domain_resource_create(zone.identity, type, options) else options[:type] = type if type service.domain_resource_update(zone.identity, identity, options) end merge_attributes(response.body['DATA']) true end
zone()
click to toggle source
# File lib/fog/linode/models/dns/record.rb, line 34 def zone @zone end
Private Instance Methods
zone=(new_zone)
click to toggle source
# File lib/fog/linode/models/dns/record.rb, line 62 def zone=(new_zone) @zone = new_zone end