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

Inherits:
Resolv::DNS::Resource show all
Defined in:
lib/resolv.rb

Overview

Start Of Authority resource.

Constant Summary

TypeValue =

:nodoc:

6

Constants inherited from Resolv::DNS::Resource

ClassHash, ClassInsensitiveTypes, ClassValue

Instance Attribute Summary (collapse)

Attributes inherited from Resolv::DNS::Resource

#ttl

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Resolv::DNS::Resource

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

Constructor Details

- (SOA) initialize(mname, rname, serial, refresh, retry_, expire, minimum)

Creates a new SOA record. See the attr documentation for the details of each argument.



1684
1685
1686
1687
1688
1689
1690
1691
1692
# File 'lib/resolv.rb', line 1684

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

- (Object) expire (readonly)

Time in seconds that a secondary name server is to use the data before refreshing from the primary name server.



1725
1726
1727
# File 'lib/resolv.rb', line 1725

def expire
  @expire
end

- (Object) minimum (readonly)

The minimum number of seconds to be used for TTL values in RRs.



1730
1731
1732
# File 'lib/resolv.rb', line 1730

def minimum
  @minimum
end

- (Object) mname (readonly)

Name of the host where the master zone file for this zone resides.



1697
1698
1699
# File 'lib/resolv.rb', line 1697

def mname
  @mname
end

- (Object) refresh (readonly)

How often, in seconds, a secondary name server is to check for updates from the primary name server.



1713
1714
1715
# File 'lib/resolv.rb', line 1713

def refresh
  @refresh
end

- (Object) retry (readonly)

How often, in seconds, a secondary name server is to retry after a failure to check for a refresh.



1719
1720
1721
# File 'lib/resolv.rb', line 1719

def retry
  @retry
end

- (Object) rname (readonly)

The person responsible for this domain name.



1702
1703
1704
# File 'lib/resolv.rb', line 1702

def rname
  @rname
end

- (Object) serial (readonly)

The version number of the zone file.



1707
1708
1709
# File 'lib/resolv.rb', line 1707

def serial
  @serial
end

Class Method Details

+ (Object) decode_rdata(msg)

:nodoc:



1738
1739
1740
1741
1742
1743
1744
# File 'lib/resolv.rb', line 1738

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

- (Object) encode_rdata(msg)

:nodoc:



1732
1733
1734
1735
1736
# File 'lib/resolv.rb', line 1732

def encode_rdata(msg) # :nodoc:
  msg.put_name(@mname)
  msg.put_name(@rname)
  msg.put_pack('NNNNN', @serial, @refresh, @retry, @expire, @minimum)
end