Sha256: ee9e0f4ad215faf445b13c7d587b40960edd5c55e785b504041f0d77c1a7a917
Contents?: true
Size: 544 Bytes
Versions: 46
Compression:
Stored size: 544 Bytes
Contents
module RecordStore class Record::TXT < Record attr_accessor :txtdata validates :txtdata, presence: true, length: { maximum: 4096 } validate :escaped_semicolons def initialize(record) super @txtdata = record.fetch(:txtdata) end def rdata { txtdata: txtdata } end def rdata_txt Record.quote(txtdata) end private def escaped_semicolons if txtdata =~ /([^\\]|\A);/ errors.add(:txtdata, 'has unescaped semicolons (See RFC 1035).') end end end end
Version data entries
46 entries across 46 versions & 1 rubygems