123456789_123456789_123456789_123456789_123456789_

Class: Resolv::DNS::Resource::HINFO

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

Overview

Host Information resource.

Constant Summary

::Resolv::DNS::Resource - Inherited

ClassHash, ClassInsensitiveTypes, ClassValue

Class Method Summary

::Resolv::DNS::Resource - Inherited

::Resolv::DNS::Query - Inherited

Instance Attribute Summary

  • #cpu readonly

    CPU architecture for this resource.

  • #os readonly

    Operating system for this resource.

::Resolv::DNS::Resource - Inherited

#ttl

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

Instance Method Summary

Constructor Details

.new(cpu, os) ⇒ HINFO

Creates a new HINFO running #os on #cpu.

[ GitHub ]

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

def initialize(cpu, os)
  @cpu = cpu
  @os = os
end

Class Method Details

.decode_rdata(msg)

This method is for internal use only.
[ GitHub ]

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

def self.decode_rdata(msg) # :nodoc:
  cpu = msg.get_string
  os = msg.get_string
  return self.new(cpu, os)
end

Instance Attribute Details

#cpu (readonly)

CPU architecture for this resource.

[ GitHub ]

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

attr_reader :cpu

#os (readonly)

Operating system for this resource.

[ GitHub ]

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

attr_reader :os

Instance Method Details

#encode_rdata(msg)

This method is for internal use only.
[ GitHub ]

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

def encode_rdata(msg) # :nodoc:
  msg.put_string(@cpu)
  msg.put_string(@os)
end