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

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

Overview

Host Information resource.

Constant Summary collapse

TypeValue =

:nodoc:

13

Constants inherited from Gem::Resolv::DNS::Resource

ClassHash, ClassInsensitiveTypes, ClassValue

Instance Attribute Summary collapse

Attributes inherited from Gem::Resolv::DNS::Resource

#ttl

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Gem::Resolv::DNS::Resource

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

Constructor Details

#initialize(cpu, os) ⇒ HINFO

Creates a new HINFO running os on cpu.



2325
2326
2327
2328
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2325

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

Instance Attribute Details

#cpuObject (readonly)

CPU architecture for this resource.



2333
2334
2335
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2333

def cpu
  @cpu
end

#osObject (readonly)

Operating system for this resource.



2338
2339
2340
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2338

def os
  @os
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:



2345
2346
2347
2348
2349
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2345

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:



2340
2341
2342
2343
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2340

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