lib/net/dns/rr/null.rb in net-dns-0.8.0 vs lib/net/dns/rr/null.rb in net-dns-0.9.0
- old
+ new
@@ -1,9 +1,8 @@
module Net # :nodoc:
module DNS
class RR
-
#------------------------------------------------------------
# RR type NULL
#------------------------------------------------------------
class NULL < RR
attr_reader :null
@@ -18,36 +17,34 @@
def get_data
@null_pack
end
def get_inspect
- "#@null"
+ @null.to_s
end
def subclass_new_from_hash(args)
- if args.has_key? :null
+ if args.key? :null
@null = args[:null]
else
raise ArgumentError, ":null field is mandatory but missing"
end
end
def subclass_new_from_string(str)
@null = str.strip
end
- def subclass_new_from_binary(data,offset)
- @null = data[offset..offset+@rdlength]
- return offset + @rdlength
+ def subclass_new_from_binary(data, offset)
+ @null = data[offset..offset + @rdlength]
+ offset + @rdlength
end
private
- def set_type
- @type = Net::DNS::RR::Types.new("NULL")
- end
-
+ def set_type
+ @type = Net::DNS::RR::Types.new("NULL")
+ end
end
-
end
end
end