Parent

Methods

Class/Module Index [+]

Quicksearch

Fog::DNS::Softlayer::Record

Public Class Methods

new(attributes={}) click to toggle source
# File lib/fog/softlayer/models/dns/record.rb, line 25
def initialize(attributes={})
  self.domain_id = attributes[:domain_id]
  super(attributes)
end

Public Instance Methods

destroy() click to toggle source
# File lib/fog/softlayer/models/dns/record.rb, line 30
def destroy
  response = service.delete_record(identity)
  response.body
end
save() click to toggle source
# File lib/fog/softlayer/models/dns/record.rb, line 35
def save
  requires :name, :type, :value, :domain_id
  opts = generate_template

  # to save or to update, thats the question
  if id.nil?
    data = service.create_record(opts)
    merge_attributes(data.body)
  else
    data = service.update_record(self.id, opts)
  end
  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.