Class: Resolv::DNS::Resource::SOA

Inherits:
Resolv::DNS::Resource show all
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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resolv::DNS::Resource

#==, #eql?, get_class, #hash

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

#expireObject (readonly)

Returns the value of attribute expire.



1567
1568
1569
# File 'lib/net/dns/resolv.rb', line 1567

def expire
  @expire
end

#minimumObject (readonly)

Returns the value of attribute minimum.



1567
1568
1569
# File 'lib/net/dns/resolv.rb', line 1567

def minimum
  @minimum
end

#mnameObject (readonly)

Returns the value of attribute mname.



1567
1568
1569
# File 'lib/net/dns/resolv.rb', line 1567

def mname
  @mname
end

#refreshObject (readonly)

Returns the value of attribute refresh.



1567
1568
1569
# File 'lib/net/dns/resolv.rb', line 1567

def refresh
  @refresh
end

#retryObject (readonly)

Returns the value of attribute retry.



1567
1568
1569
# File 'lib/net/dns/resolv.rb', line 1567

def retry
  @retry
end

#rnameObject (readonly)

Returns the value of attribute rname.



1567
1568
1569
# File 'lib/net/dns/resolv.rb', line 1567

def rname
  @rname
end

#serialObject (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