Parent

Class/Module Index [+]

Quicksearch

Fog::DNS::Linode::Record

Public Class Methods

new(attributes={}) click to toggle source

"PROTOCOL":"", "WEIGHT":0, "PORT":0,

# File lib/fog/linode/models/dns/record.rb, line 25
def initialize(attributes={})
  self.ttl    ||= 3600
  super
end

Public Instance Methods

destroy() click to toggle source
# File lib/fog/linode/models/dns/record.rb, line 30
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 40
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 36
def zone
  @zone
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.