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

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

Constant Summary collapse

TypeValue =
13

Constants inherited from Resolv::DNS::Resource

ClassHash, ClassInsensitiveTypes, ClassValue

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resolv::DNS::Resource

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

Constructor Details

#initialize(cpu, os) ⇒ HINFO

Returns a new instance of HINFO.



1493
1494
1495
1496
# File 'lib/resolv.rb', line 1493

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

Instance Attribute Details

#cpuObject (readonly)

Returns the value of attribute cpu.



1497
1498
1499
# File 'lib/resolv.rb', line 1497

def cpu
  @cpu
end

#osObject (readonly)

Returns the value of attribute os.



1497
1498
1499
# File 'lib/resolv.rb', line 1497

def os
  @os
end

Class Method Details

.decode_rdata(msg) ⇒ Object



1504
1505
1506
1507
1508
# File 'lib/resolv.rb', line 1504

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

Instance Method Details

#encode_rdata(msg) ⇒ Object



1499
1500
1501
1502
# File 'lib/resolv.rb', line 1499

def encode_rdata(msg)
  msg.put_string(@cpu)
  msg.put_string(@os)
end