Class: Net::DNS::RR::HINFO
- Inherits:
-
Net::DNS::RR
- Object
- Net::DNS::RR
- Net::DNS::RR::HINFO
- Defined in:
- lib/net/dns/rr/hinfo.rb
Overview
System Information Record (HINFO)
Class for DNS HINFO resource records.
Allows definition of the Hardware type and Operating System (OS) in use at a host. For security reasons these records are rarely used on public servers. If a space exists in the field it must be enclosed in quotes. Single space between CPU and OS parameters.
Constant Summary
Constants inherited from Net::DNS::RR
Constants included from Names
Instance Attribute Summary collapse
-
#cpu ⇒ Object
readonly
Gets the CPU value.
-
#os ⇒ Object
readonly
Gets the OS value.
Attributes inherited from Net::DNS::RR
Instance Method Summary collapse
-
#to_a ⇒ Object
Gets a list of all the attributes for this record.
-
#value ⇒ Object
Gets the standardized value for this record, represented by the value of
cpu
andos
.
Methods inherited from Net::DNS::RR
#cls, #comp_data, #data, #initialize, #inspect, parse, parse_packet, #to_s, #type
Methods included from Names
#dn_comp, #dn_expand, #names_array, #pack_name, #valid?
Constructor Details
This class inherits a constructor from Net::DNS::RR
Instance Attribute Details
#cpu ⇒ Object (readonly)
Gets the CPU value.
Returns a String.
18 19 20 |
# File 'lib/net/dns/rr/hinfo.rb', line 18 def cpu @cpu end |
#os ⇒ Object (readonly)
Gets the OS value.
Returns a String.
23 24 25 |
# File 'lib/net/dns/rr/hinfo.rb', line 23 def os @os end |
Instance Method Details
#to_a ⇒ Object
Gets a list of all the attributes for this record.
Returns an Array of values.
36 37 38 |
# File 'lib/net/dns/rr/hinfo.rb', line 36 def to_a [nil, nil, cls.to_s, type.to_s, value] end |
#value ⇒ Object
Gets the standardized value for this record, represented by the value of cpu
and os
.
Returns a String.
29 30 31 |
# File 'lib/net/dns/rr/hinfo.rb', line 29 def value %Q("#{cpu}" "#{os}") end |