123456789_123456789_123456789_123456789_123456789_

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

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

Overview

::Gem::Resolv::IPv4 Address resource

Constant Summary

::Gem::Resolv::DNS::Resource - Inherited

ClassHash, ClassInsensitiveTypes, ClassValue

Class Method Summary

Instance Attribute Summary

::Gem::Resolv::DNS::Resource - Inherited

#ttl

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

Instance Method Summary

Constructor Details

.new(address) ⇒ A

Creates a new A for #address.

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2643

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

Class Method Details

.decode_rdata(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2656

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

Instance Attribute Details

#address (readonly)

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

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2650

attr_reader :address

Instance Method Details

#encode_rdata(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2652

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