class DNS::Zone::RR::DS
‘DS` resource record.
RFC 4034
Constants
- REGEX_DS_RDATA
Attributes
algorithm[RW]
digest[RW]
digest_type[RW]
key_tag[RW]
Public Instance Methods
dump()
click to toggle source
# File lib/dns/zone/rr/ds.rb, line 15 def dump parts = general_prefix parts << key_tag parts << algorithm parts << digest_type parts << digest parts.join(' ') end
load(string, options = {})
click to toggle source
# File lib/dns/zone/rr/ds.rb, line 24 def load(string, options = {}) rdata = load_general_and_get_rdata(string, options) return nil unless rdata captures = rdata.match(REGEX_DS_RDATA) return nil unless captures @key_tag = captures[:key_tag].to_i @algorithm = captures[:algorithm].to_i @digest_type = captures[:digest_type].to_i @digest = captures[:digest].scan(/#{DNS::Zone::RR::REGEX_STRING}/).join self end