class DNS::Zone::RR::TXT
‘A` resource record.
RFC 1035
Attributes
text[RW]
Public Instance Methods
dump()
click to toggle source
# File lib/dns/zone/rr/txt.rb, line 8 def dump parts = general_prefix parts << %Q{"#{text}"} parts.join(' ') end
load(string, options = {})
click to toggle source
# File lib/dns/zone/rr/txt.rb, line 14 def load(string, options = {}) rdata = load_general_and_get_rdata(string, options) return nil unless rdata # extract text from within quotes; allow multiple quoted strings; ignore escaped quotes @text = rdata.scan(/"#{DNS::Zone::RR::REGEX_STRING}"/).join self end