Class: ResolvFiber::DNS::Resource::HINFO

Inherits:
ResolvFiber::DNS::Resource show all
Defined in:
lib/resolv_fiber.rb

Overview

Host Information resource.

Constant Summary collapse

TypeValue =

:nodoc:

13

Constants inherited from ResolvFiber::DNS::Resource

ClassHash, ClassInsensitiveTypes, ClassValue

Instance Attribute Summary collapse

Attributes inherited from ResolvFiber::DNS::Resource

#ttl

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ResolvFiber::DNS::Resource

#==, #eql?, get_class, #hash

Constructor Details

#initialize(cpu, os) ⇒ HINFO

Creates a new HINFO running os on cpu.



1935
1936
1937
1938
# File 'lib/resolv_fiber.rb', line 1935

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

Instance Attribute Details

#cpuObject (readonly)

CPU architecture for this resource.



1943
1944
1945
# File 'lib/resolv_fiber.rb', line 1943

def cpu
  @cpu
end

#osObject (readonly)

Operating system for this resource.



1948
1949
1950
# File 'lib/resolv_fiber.rb', line 1948

def os
  @os
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:



1955
1956
1957
1958
1959
# File 'lib/resolv_fiber.rb', line 1955

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:



1950
1951
1952
1953
# File 'lib/resolv_fiber.rb', line 1950

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