class DNS::Zone::RR::SRV
‘SRV` resource record.
RFC 2782
Constants
- REGEX_SRV_RDATA
Attributes
port[RW]
priority[RW]
target[RW]
weight[RW]
Public Instance Methods
dump()
click to toggle source
# File lib/dns/zone/rr/srv.rb, line 15 def dump parts = general_prefix parts << priority parts << weight parts << port parts << target parts.join(' ') end
load(string, options = {})
click to toggle source
# File lib/dns/zone/rr/srv.rb, line 24 def load(string, options = {}) rdata = load_general_and_get_rdata(string, options) return nil unless rdata captures = rdata.match(REGEX_SRV_RDATA) return nil unless captures @priority = captures[:priority].to_i @weight = captures[:weight].to_i @port = captures[:port].to_i @target = captures[:target] self end