Class: Resolv::DNS::Resource::SOA
- Inherits:
-
Resolv::DNS::Resource
- Object
- Query
- Resolv::DNS::Resource
- Resolv::DNS::Resource::SOA
- Defined in:
- lib/resolv.rb
Constant Summary collapse
- TypeValue =
6
Constants inherited from Resolv::DNS::Resource
ClassHash, ClassInsensitiveTypes, ClassValue
Instance Attribute Summary collapse
-
#expire ⇒ Object
readonly
Returns the value of attribute expire.
-
#minimum ⇒ Object
readonly
Returns the value of attribute minimum.
-
#mname ⇒ Object
readonly
Returns the value of attribute mname.
-
#refresh ⇒ Object
readonly
Returns the value of attribute refresh.
-
#retry ⇒ Object
readonly
Returns the value of attribute retry.
-
#rname ⇒ Object
readonly
Returns the value of attribute rname.
-
#serial ⇒ Object
readonly
Returns the value of attribute serial.
Class Method Summary collapse
Instance Method Summary collapse
- #encode_rdata(msg) ⇒ Object
-
#initialize(mname, rname, serial, refresh, retry_, expire, minimum) ⇒ SOA
constructor
A new instance of SOA.
Methods inherited from Resolv::DNS::Resource
Constructor Details
#initialize(mname, rname, serial, refresh, retry_, expire, minimum) ⇒ SOA
Returns a new instance of SOA.
1506 1507 1508 1509 1510 1511 1512 1513 1514 |
# File 'lib/resolv.rb', line 1506 def initialize(mname, rname, serial, refresh, retry_, expire, minimum) @mname = mname @rname = rname @serial = serial @refresh = refresh @retry = retry_ @expire = expire @minimum = minimum end |
Instance Attribute Details
#expire ⇒ Object (readonly)
Returns the value of attribute expire
1515 1516 1517 |
# File 'lib/resolv.rb', line 1515 def expire @expire end |
#minimum ⇒ Object (readonly)
Returns the value of attribute minimum
1515 1516 1517 |
# File 'lib/resolv.rb', line 1515 def minimum @minimum end |
#mname ⇒ Object (readonly)
Returns the value of attribute mname
1515 1516 1517 |
# File 'lib/resolv.rb', line 1515 def mname @mname end |
#refresh ⇒ Object (readonly)
Returns the value of attribute refresh
1515 1516 1517 |
# File 'lib/resolv.rb', line 1515 def refresh @refresh end |
#retry ⇒ Object (readonly)
Returns the value of attribute retry
1515 1516 1517 |
# File 'lib/resolv.rb', line 1515 def retry @retry end |
#rname ⇒ Object (readonly)
Returns the value of attribute rname
1515 1516 1517 |
# File 'lib/resolv.rb', line 1515 def rname @rname end |
#serial ⇒ Object (readonly)
Returns the value of attribute serial
1515 1516 1517 |
# File 'lib/resolv.rb', line 1515 def serial @serial end |
Class Method Details
.decode_rdata(msg) ⇒ Object
1523 1524 1525 1526 1527 1528 1529 |
# File 'lib/resolv.rb', line 1523 def self.decode_rdata(msg) mname = msg.get_name rname = msg.get_name serial, refresh, retry_, expire, minimum = msg.get_unpack('NNNNN') return self.new( mname, rname, serial, refresh, retry_, expire, minimum) end |
Instance Method Details
#encode_rdata(msg) ⇒ Object
1517 1518 1519 1520 1521 |
# File 'lib/resolv.rb', line 1517 def encode_rdata(msg) msg.put_name(@mname) msg.put_name(@rname) msg.put_pack('NNNNN', @serial, @refresh, @retry, @expire, @minimum) end |