Class: Resolv::DNS::Resource::IN::AAAA

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

Constant Summary

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(address) ⇒ AAAA

Returns a new instance of AAAA.



1647
1648
1649
# File 'lib/logmerge/resolv.rb', line 1647

def initialize(address)
  @address = IPv6.create(address)
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



1650
1651
1652
# File 'lib/logmerge/resolv.rb', line 1650

def address
  @address
end

Class Method Details

.decode_rdata(msg) ⇒ Object



1656
1657
1658
# File 'lib/logmerge/resolv.rb', line 1656

def self.decode_rdata(msg)
  return self.new(IPv6.new(msg.get_bytes(16)))
end

Instance Method Details

#encode_rdata(msg) ⇒ Object



1652
1653
1654
# File 'lib/logmerge/resolv.rb', line 1652

def encode_rdata(msg)
  msg.put_bytes(@address.address)
end