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

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

Overview

Start Of Authority resource.

Constant Summary collapse

TypeValue =

:nodoc:

6

Constants inherited from Gem::Resolv::DNS::Resource

ClassHash, ClassInsensitiveTypes, ClassValue

Instance Attribute Summary collapse

Attributes inherited from Gem::Resolv::DNS::Resource

#ttl

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Gem::Resolv::DNS::Resource

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

Constructor Details

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

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



2245
2246
2247
2248
2249
2250
2251
2252
2253
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2245

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)

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



2286
2287
2288
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2286

def expire
  @expire
end

#minimumObject (readonly)

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



2291
2292
2293
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2291

def minimum
  @minimum
end

#mnameObject (readonly)

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



2258
2259
2260
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2258

def mname
  @mname
end

#refreshObject (readonly)

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



2274
2275
2276
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2274

def refresh
  @refresh
end

#retryObject (readonly)

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



2280
2281
2282
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2280

def retry
  @retry
end

#rnameObject (readonly)

The person responsible for this domain name.



2263
2264
2265
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2263

def rname
  @rname
end

#serialObject (readonly)

The version number of the zone file.



2268
2269
2270
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2268

def serial
  @serial
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:



2299
2300
2301
2302
2303
2304
2305
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2299

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:



2293
2294
2295
2296
2297
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2293

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