lib/net/dns/rr/null.rb in net-dns-0.5.3 vs lib/net/dns/rr/null.rb in net-dns-0.6.0

- old
+ new

@@ -1,14 +1,5 @@ -## -# -# Net::DNS::RR::NULL -# -# $Id: NULL.rb,v 1.5 2006/07/28 07:33:36 bluemonk Exp $ -# -## - - module Net module DNS class RR #------------------------------------------------------------ @@ -22,14 +13,10 @@ def build_pack @null_pack = @null @rdlength = @null_pack.size end - def set_type - @type = Net::DNS::RR::RRTypes.new("NULL") - end - def get_data @null_pack end def get_inspect @@ -38,11 +25,11 @@ def subclass_new_from_hash(args) if args.has_key? :null @null = args[:null] else - raise RRArgumentError, ":null field is mandatory but missing" + raise ArgumentError, ":null field is mandatory but missing" end end def subclass_new_from_string(str) @null = str.strip @@ -50,9 +37,15 @@ def subclass_new_from_binary(data,offset) @null = data[offset..offset+@rdlength] return offset + @rdlength end + + private + + def set_type + @type = Net::DNS::RR::Types.new("NULL") + end end # class NULL end # class RR end # module DNS