Parent

Files

Class/Module Index [+]

Quicksearch

Fog::DNS::Slicehost::Record

Public Class Methods

new(attributes={}) click to toggle source
# File lib/fog/slicehost/models/dns/record.rb, line 22
def initialize(attributes={})
  self.active ||= true
  self.ttl    ||= 3600
  super
end

Public Instance Methods

active=(new_active) click to toggle source
# File lib/fog/slicehost/models/dns/record.rb, line 28
def active=(new_active)
  attributes[:active] = case new_active
  when false, 'N'
    false
  when true, 'Y'
    true
  end
end
destroy() click to toggle source
# File lib/fog/slicehost/models/dns/record.rb, line 37
def destroy
  requires :identity
  connection.delete_record(identity)
  true
end
save() click to toggle source
# File lib/fog/slicehost/models/dns/record.rb, line 47
def save
  
  requires :name, :type, :value, :zone
  options = {}
  options[:active]  = active ? 'Y' : 'N'
  options[:aux]     = description if description
  options[:ttl]     = ttl if ttl
  if identity
    data = connection.update_record(identity, type, zone.id, name, value, options)
  else
    data = connection.create_record(type, zone.id, name, value, options)
  end
  merge_attributes(data.body)
  true
end
zone() click to toggle source
# File lib/fog/slicehost/models/dns/record.rb, line 43
def zone
  @zone
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.