Class: DNS::Zone::RR::NSEC3PARAM
- Defined in:
- lib/dns/zone/rr/nsec3param.rb
Overview
‘NSEC3PARAM` resource record.
RFC 5155
Constant Summary collapse
- REGEX_NSEC3PARAM_RDATA =
%r{ (?<algorithm>\d+)\s* (?<flags>\d+)\s* (?<iterations>\d+)\s* (?<salt>\S+)\s* }mx
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#iterations ⇒ Object
Returns the value of attribute iterations.
-
#salt ⇒ Object
Returns the value of attribute salt.
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
#algorithm ⇒ Object
Returns the value of attribute algorithm.
13 14 15 |
# File 'lib/dns/zone/rr/nsec3param.rb', line 13 def algorithm @algorithm end |
#flags ⇒ Object
Returns the value of attribute flags.
13 14 15 |
# File 'lib/dns/zone/rr/nsec3param.rb', line 13 def flags @flags end |
#iterations ⇒ Object
Returns the value of attribute iterations.
13 14 15 |
# File 'lib/dns/zone/rr/nsec3param.rb', line 13 def iterations @iterations end |
#salt ⇒ Object
Returns the value of attribute salt.
13 14 15 |
# File 'lib/dns/zone/rr/nsec3param.rb', line 13 def salt @salt end |
Instance Method Details
#dump ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/dns/zone/rr/nsec3param.rb', line 15 def dump parts = general_prefix parts << algorithm parts << flags parts << iterations parts << salt parts.join(' ') end |
#load(string, options = {}) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/dns/zone/rr/nsec3param.rb', line 24 def load(string, = {}) rdata = load_general_and_get_rdata(string, ) return nil unless rdata captures = rdata.match(REGEX_NSEC3PARAM_RDATA) return nil unless captures @algorithm = captures[:algorithm].to_i @flags = captures[:flags].to_i @iterations = captures[:iterations].to_i @salt = captures[:salt] self end |