123456789_123456789_123456789_123456789_123456789_

Class: Resolv::DNS::Resource::IN::A

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Resolv::DNS::Resource
Defined in: lib/resolv.rb

Overview

::Resolv::IPv4 Address resource

Constant Summary

::Resolv::DNS::Resource - Inherited

ClassHash, ClassInsensitiveTypes, ClassValue

Class Method Summary

Instance Attribute Summary

::Resolv::DNS::Resource - Inherited

#ttl

Remaining Time To Live for this ::Resolv::DNS::Resource.

Instance Method Summary

Constructor Details

.new(address) ⇒ A

Creates a new A for #address.

[ GitHub ]

  
# File 'lib/resolv.rb', line 2181

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

Class Method Details

.decode_rdata(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/resolv.rb', line 2194

def self.decode_rdata(msg) # :nodoc:
  return self.new(IPv4.new(msg.get_bytes(4)))
end

Instance Attribute Details

#address (readonly)

The ::Resolv::IPv4 address for this A.

[ GitHub ]

  
# File 'lib/resolv.rb', line 2188

attr_reader :address

Instance Method Details

#encode_rdata(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/resolv.rb', line 2190

def encode_rdata(msg) # :nodoc:
  msg.put_bytes(@address.address)
end