Parent

Class/Module Index [+]

Quicksearch

Fog::DNS::Zerigo::Record

Public Class Methods

new(attributes={}) click to toggle source
# File lib/fog/zerigo/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/zerigo/models/dns/record.rb, line 30
def destroy
  requires :identity
  service.delete_host(identity)
  true
end
save() click to toggle source
# File lib/fog/zerigo/models/dns/record.rb, line 40
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 36
def zone
  @zone
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.