Sha256: e9c1e0ff371d88b964ff48d1b3d3cdead9bf4bf888ae5dc5d75d4114ac23afa4
Contents?: true
Size: 608 Bytes
Versions: 33
Compression:
Stored size: 608 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') unless fqdn != cname end end end
Version data entries
33 entries across 33 versions & 1 rubygems