Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/lib/net/dns/rr/null.rb
Views: 11784
# -*- coding: binary -*-1##2#3# Net::DNS::RR::NULL4#5# $Id: NULL.rb,v 1.5 2006/07/28 07:33:36 bluemonk Exp $6#7##8910module Net11module DNS12class RR1314#------------------------------------------------------------15# RR type NULL16#------------------------------------------------------------17class NULL < RR18attr_reader :null1920private2122def build_pack23@null_pack = @null24@rdlength = @null_pack.size25end2627def set_type28@type = Net::DNS::RR::RRTypes.new("NULL")29end3031def get_data32@null_pack33end3435def get_inspect36"#@null"37end3839def subclass_new_from_hash(args)40if args.has_key? :null41@null = args[:null]42else43raise RRArgumentError, ":null field is mandatory but missing"44end45end4647def subclass_new_from_string(str)48@null = str.strip49end5051def subclass_new_from_binary(data,offset)52@null = data[offset..offset+@rdlength]53return offset + @rdlength54end5556end # class NULL5758end # class RR59end # module DNS60end # module Net616263