class Fog::HP::DNS::Record
Public Class Methods
new(new_attributes = {})
click to toggle source
Calls superclass method
# File lib/fog/hp/models/dns/record.rb, line 19 def initialize(new_attributes = {}) super(new_attributes) self.domain_id = domain.id if domain self end
Public Instance Methods
destroy()
click to toggle source
# File lib/fog/hp/models/dns/record.rb, line 25 def destroy requires :id, :domain_id service.delete_record(self.domain_id, id) true end
save()
click to toggle source
# File lib/fog/hp/models/dns/record.rb, line 31 def save identity ? update : create end
Private Instance Methods
create()
click to toggle source
# File lib/fog/hp/models/dns/record.rb, line 41 def create requires :domain_id ### Inconsistent API behavior - does not return 'record' merge_attributes(service.create_record(self.domain_id, self.name, self.type, self.data, attributes).body) true end
domain()
click to toggle source
# File lib/fog/hp/models/dns/record.rb, line 37 def domain collection.domain end
update()
click to toggle source
# File lib/fog/hp/models/dns/record.rb, line 48 def update requires :id, :domain_id ### Inconsistent API behavior - does not return 'record' merge_attributes(service.update_record(self.domain_id, id, attributes).body) true end