Class: Dnsruby::RR::HINFO
- Inherits:
-
Dnsruby::RR
- Object
- Dnsruby::RR
- Dnsruby::RR::HINFO
- Defined in:
- lib/Dnsruby/resource/HINFO.rb
Overview
Class for DNS Host Information (HINFO) resource records.
Constant Summary collapse
Constants inherited from Dnsruby::RR
Instance Attribute Summary collapse
-
#cpu ⇒ Object
The CPU type for this RR.
-
#os ⇒ Object
The operating system type for this RR.
Attributes inherited from Dnsruby::RR
#klass, #name, #rdata, #ttl, #type
Class Method Summary collapse
-
.decode_rdata(msg) ⇒ Object
:nodoc: all.
Instance Method Summary collapse
-
#encode_rdata(msg) ⇒ Object
:nodoc: all.
-
#from_data(data) ⇒ Object
:nodoc: all.
-
#from_string(input) ⇒ Object
:nodoc: all.
-
#rdata_to_string ⇒ Object
:nodoc: all.
Methods inherited from Dnsruby::RR
#==, create, #eql?, #from_hash, get_class, #hash, implemented_rrs, #init_defaults, new_from_data, new_from_hash, new_from_string, #rdlength, #sameRRset, #to_s
Instance Attribute Details
#cpu ⇒ Object
The CPU type for this RR.
24 25 26 |
# File 'lib/Dnsruby/resource/HINFO.rb', line 24 def cpu @cpu end |
#os ⇒ Object
The operating system type for this RR.
26 27 28 |
# File 'lib/Dnsruby/resource/HINFO.rb', line 26 def os @os end |
Class Method Details
.decode_rdata(msg) ⇒ Object
:nodoc: all
45 46 47 48 49 |
# File 'lib/Dnsruby/resource/HINFO.rb', line 45 def self.decode_rdata(msg) #:nodoc: all cpu = msg.get_string os = msg.get_string return self.new([cpu, os]) end |
Instance Method Details
#encode_rdata(msg) ⇒ Object
:nodoc: all
40 41 42 43 |
# File 'lib/Dnsruby/resource/HINFO.rb', line 40 def encode_rdata(msg) #:nodoc: all msg.put_string(@cpu) msg.put_string(@os) end |
#from_data(data) ⇒ Object
:nodoc: all
28 29 30 |
# File 'lib/Dnsruby/resource/HINFO.rb', line 28 def from_data(data) #:nodoc: all @cpu, @os= data end |
#from_string(input) ⇒ Object
:nodoc: all
32 33 34 |
# File 'lib/Dnsruby/resource/HINFO.rb', line 32 def from_string(input) #:nodoc: all @cpu, @os = input.split(" ") end |
#rdata_to_string ⇒ Object
:nodoc: all
36 37 38 |
# File 'lib/Dnsruby/resource/HINFO.rb', line 36 def rdata_to_string #:nodoc: all return "#{@cpu} #{@os}" end |