class DLDInternet::DOctl::API::Compute::Domain::Records::Create
Public Instance Methods
CreateDomainRecord(domain, record)
click to toggle source
noinspection RubyUnnecessaryReturnValue
# File lib/dldinternet/doctl/api/compute/domain/records/create.rb, line 12 def CreateDomainRecord(domain, record) client.domain_records.create(record, for_domain: domain) rescue ::DropletKit::Error => e if matches = e.message.match(%r{^([0-9]{3}):\s+(\{.*\})\s*$}) json = JSON.parse(matches[2]) @logger.fatal json['message'] else @logger.fatal e.message end exit 1 end