Class: Resolv::DNS::Resource::SOA
- Inherits:
-
Resolv::DNS::Resource
- Object
- Query
- Resolv::DNS::Resource
- Resolv::DNS::Resource::SOA
- Defined in:
- lib/net/dns/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
-
.decode_rdata(msg) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#encode_rdata(msg) ⇒ Object
:nodoc:.
-
#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.
1558 1559 1560 1561 1562 1563 1564 1565 1566 |
# File 'lib/net/dns/resolv.rb', line 1558 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.
1567 1568 1569 |
# File 'lib/net/dns/resolv.rb', line 1567 def expire @expire end |
#minimum ⇒ Object (readonly)
Returns the value of attribute minimum.
1567 1568 1569 |
# File 'lib/net/dns/resolv.rb', line 1567 def minimum @minimum end |
#mname ⇒ Object (readonly)
Returns the value of attribute mname.
1567 1568 1569 |
# File 'lib/net/dns/resolv.rb', line 1567 def mname @mname end |
#refresh ⇒ Object (readonly)
Returns the value of attribute refresh.
1567 1568 1569 |
# File 'lib/net/dns/resolv.rb', line 1567 def refresh @refresh end |
#retry ⇒ Object (readonly)
Returns the value of attribute retry.
1567 1568 1569 |
# File 'lib/net/dns/resolv.rb', line 1567 def retry @retry end |
#rname ⇒ Object (readonly)
Returns the value of attribute rname.
1567 1568 1569 |
# File 'lib/net/dns/resolv.rb', line 1567 def rname @rname end |
#serial ⇒ Object (readonly)
Returns the value of attribute serial.
1567 1568 1569 |
# File 'lib/net/dns/resolv.rb', line 1567 def serial @serial end |
Class Method Details
.decode_rdata(msg) ⇒ Object
:nodoc:
1575 1576 1577 1578 1579 1580 1581 |
# File 'lib/net/dns/resolv.rb', line 1575 def self.decode_rdata(msg) # :nodoc: 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
:nodoc:
1569 1570 1571 1572 1573 |
# File 'lib/net/dns/resolv.rb', line 1569 def encode_rdata(msg) # :nodoc: msg.put_name(@mname) msg.put_name(@rname) msg.put_pack('NNNNN', @serial, @refresh, @retry, @expire, @minimum) end |