Method: Net::DNS::Header#inspect
- Defined in:
- lib/net/dns/header.rb
#inspect ⇒ Object
Inspect method, prints out all the options and relative values.
p Net::DNS::Header.new
# ;; id = 18123
# ;; qr = 0 opCode: 0 aa = 0 tc = 0 rd = 1
# ;; ra = 0 ad = 0 cd = 0 rcode = 0
# ;; qdCount = 1 anCount = 0 nsCount = 0 arCount = 0
This method will maybe be changed in the future to a more pretty way of display output.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/net/dns/header.rb', line 244 def inspect ";; id = #{@id}\n" + if false # @opCode == "UPDATE" # do stuff else ";; qr = #{@qr}\t" \ "opCode: #{opCode_str}\t" \ "aa = #{@aa}\t" \ "tc = #{@tc}\t" \ "rd = #{@rd}\n" \ ";; ra = #{@ra}\t" \ "ad = #{@ad}\t" \ "cd = #{@cd}\t" \ "rcode = #{@rCode.type}\n" \ ";; qdCount = #{@qdCount}\t" \ "anCount = #{@anCount}\t" \ "nsCount = #{@nsCount}\t" \ "arCount = #{@arCount}\n" end end |