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