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

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

Overview

Host Information resource.

Constant Summary collapse

TypeValue =

:nodoc:

13

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(cpu, os) ⇒ HINFO

Creates a new HINFO running os on cpu.


1886
1887
1888
1889
# File 'lib/resolv.rb', line 1886

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

Instance Attribute Details

#cpuObject (readonly)

CPU architecture for this resource.


1894
1895
1896
# File 'lib/resolv.rb', line 1894

def cpu
  @cpu
end

#osObject (readonly)

Operating system for this resource.


1899
1900
1901
# File 'lib/resolv.rb', line 1899

def os
  @os
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:


1906
1907
1908
1909
1910
# File 'lib/resolv.rb', line 1906

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

Instance Method Details

#encode_rdata(msg) ⇒ Object

:nodoc:


1901
1902
1903
1904
# File 'lib/resolv.rb', line 1901

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