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

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

Constant Summary collapse

TypeValue =
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

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

Returns a new instance of SOA.



1468
1469
1470
1471
1472
1473
1474
1475
1476
# File 'lib/logmerge/resolv.rb', line 1468

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.



1477
1478
1479
# File 'lib/logmerge/resolv.rb', line 1477

def expire
  @expire
end

#minimumObject (readonly)

Returns the value of attribute minimum.



1477
1478
1479
# File 'lib/logmerge/resolv.rb', line 1477

def minimum
  @minimum
end

#mnameObject (readonly)

Returns the value of attribute mname.



1477
1478
1479
# File 'lib/logmerge/resolv.rb', line 1477

def mname
  @mname
end

#refreshObject (readonly)

Returns the value of attribute refresh.



1477
1478
1479
# File 'lib/logmerge/resolv.rb', line 1477

def refresh
  @refresh
end

#retryObject (readonly)

Returns the value of attribute retry.



1477
1478
1479
# File 'lib/logmerge/resolv.rb', line 1477

def retry
  @retry
end

#rnameObject (readonly)

Returns the value of attribute rname.



1477
1478
1479
# File 'lib/logmerge/resolv.rb', line 1477

def rname
  @rname
end

#serialObject (readonly)

Returns the value of attribute serial.



1477
1478
1479
# File 'lib/logmerge/resolv.rb', line 1477

def serial
  @serial
end

Class Method Details

.decode_rdata(msg) ⇒ Object



1485
1486
1487
1488
1489
1490
1491
# File 'lib/logmerge/resolv.rb', line 1485

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



1479
1480
1481
1482
1483
# File 'lib/logmerge/resolv.rb', line 1479

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