lib/net/dns/rr/ns.rb in net-dns-0.9.0 vs lib/net/dns/rr/ns.rb in net-dns-0.20.0

- old
+ new

@@ -21,14 +21,12 @@ end private def subclass_new_from_hash(options) - if options.key?(:nsdname) - @nsdname = check_name(options[:nsdname]) - else - raise ArgumentError, ":nsdname field is mandatory" - end + raise ArgumentError, ":nsdname field is mandatory" unless options.key?(:nsdname) + + @nsdname = check_name(options[:nsdname]) end def subclass_new_from_string(str) @nsdname = check_name(str) end