Sha256: f764675c18d54870a7f1c801f7a3c902f92d3f49ba5d00ca187aceab9e66a8b3
Contents?: true
Size: 604 Bytes
Versions: 12
Compression:
Stored size: 604 Bytes
Contents
module RecordStore class Record::CNAME < Record attr_accessor :cname validates :cname, presence: true, format: { with: Record::CNAME_REGEX, message: 'is not a fully qualified domain name', } validate :validate_circular_reference def initialize(record) super @cname = Record.ensure_ends_with_dot(record.fetch(:cname)) end def rdata { cname: cname } end def rdata_txt cname end def validate_circular_reference errors.add(:fqdn, 'A CNAME should not point to itself') if fqdn == cname end end end
Version data entries
12 entries across 12 versions & 1 rubygems