Class: DNS::Zone::RR::NSEC
Overview
‘NSEC` resource record.
RFC 4034
Constant Summary collapse
- REGEX_NSEC_RDATA =
%r{ (?<next_domain>#{DNS::Zone::RR::REGEX_DOMAINNAME})\s* (?<rrset_types>#{DNS::Zone::RR::REGEX_STRING})\s* }mx
Instance Attribute Summary collapse
-
#next_domain ⇒ Object
Returns the value of attribute next_domain.
-
#rrset_types ⇒ Object
Returns the value of attribute rrset_types.
Attributes inherited from Record
Instance Method Summary collapse
Methods inherited from Record
#general_prefix, #initialize, #load_general_and_get_rdata, #type
Constructor Details
This class inherits a constructor from DNS::Zone::RR::Record
Instance Attribute Details
#next_domain ⇒ Object
Returns the value of attribute next_domain.
11 12 13 |
# File 'lib/dns/zone/rr/nsec.rb', line 11 def next_domain @next_domain end |
#rrset_types ⇒ Object
Returns the value of attribute rrset_types.
11 12 13 |
# File 'lib/dns/zone/rr/nsec.rb', line 11 def rrset_types @rrset_types end |
Instance Method Details
#dump ⇒ Object
13 14 15 16 17 18 |
# File 'lib/dns/zone/rr/nsec.rb', line 13 def dump parts = general_prefix parts << next_domain parts << rrset_types parts.join(' ') end |
#load(string, options = {}) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/dns/zone/rr/nsec.rb', line 20 def load(string, = {}) rdata = load_general_and_get_rdata(string, ) return nil unless rdata captures = rdata.match(REGEX_NSEC_RDATA) return nil unless captures @next_domain = captures[:next_domain] @rrset_types = captures[:rrset_types] self end |