Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Skip redundant assignment operation

  • Loading branch information...
commit 147635d4260cfd34c1e7b321d1bfa203042afffc 1 parent 4322843
@weppos authored
View
3  lib/whois/answer/parser/whois.cira.ca.rb
@@ -74,8 +74,9 @@ class WhoisCiraCa < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Name servers:\n((?:\s+([^\s]+)\s+([^\s]+)\n)+)/
$1.split("\n").map { |value| value.split(" ").first }
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.dns.be.rb
@@ -63,8 +63,9 @@ class WhoisDnsBe < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Nameservers:\n((.+\n)+)\n/
$1.split("\n").map(&:strip)
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.domain-registry.nl.rb
@@ -69,8 +69,9 @@ class WhoisDomainRegistryNl < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Domain nameservers:\n((.+\n)+)\n/
$1.split("\n").map(&:strip)
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.educause.edu.rb
@@ -73,8 +73,9 @@ class WhoisEducauseEdu < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Name Servers: \n((.+\n)+)\n/
$1.split("\n").map { |value| value.split(" ").first.downcase }
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.eu.rb
@@ -72,8 +72,9 @@ class WhoisEu < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Nameservers:\n((.+\n)+)\n/
$1.split("\n").map { |value| value.strip.split(" ").first }
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.nic.cd.rb
@@ -65,8 +65,9 @@ class WhoisNicCd < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
$1.split("\n").map { |value| value.strip.downcase }
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.nic.ch.rb
@@ -67,8 +67,9 @@ class WhoisNicCh < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Name servers:\n((.+\n)+)(?:\n|\z)/
$1.split("\n").map { |value| value.split("\t").first }.uniq
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.nic.gl.rb
@@ -74,8 +74,9 @@ class WhoisNicGl < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
$1.split("\n").map { |value| value.strip.downcase }
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.nic.ly.rb
@@ -73,8 +73,9 @@ class WhoisNicLy < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Domain servers in listed order:\n((.+\n)+)\n/
$1.split("\n").map(&:strip)
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.nic.mu.rb
@@ -74,8 +74,9 @@ class WhoisNicMu < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
$1.split("\n").map(&:strip)
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.nic.nu.rb
@@ -71,8 +71,9 @@ class WhoisNicNu < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Domain servers in listed order:(.*)Owner and Administrative Contact information for domains/m
$1.split.map(&:strip)
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.nic.tl.rb
@@ -73,8 +73,9 @@ class WhoisNicTl < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
$1.split("\n").map(&:strip)
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.nic.uk.rb
@@ -71,8 +71,9 @@ class WhoisNicUk < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Name servers:\n((.+\n)+)\n/
$1.split("\n").map { |value| value.split(" ").first.downcase }
+ else
+ []
end
- @nameservers ||= []
end
View
3  lib/whois/answer/parser/whois.nic.ve.rb
@@ -67,8 +67,9 @@ class WhoisNicVe < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ (/Servidor\(es\) de Nombres de Dominio:\n\n((?:\s+\s-\s(.*?)\n)+)/)
$1.scan(/-\s(.*?)\n/).flatten
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.samoanic.ws.rb
@@ -73,8 +73,9 @@ class WhoisSamoanicWs < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Current Nameservers:\n\n((.+\n)+)\n/
$1.split("\n").map { |value| value.strip.downcase }
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.za.net.rb
@@ -69,8 +69,9 @@ class WhoisZaNet < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Domain Name Servers listed in order:\n\n((.+\n)+)\n/
$1.split("\n").map(&:strip).reject(&:empty?).compact
+ else
+ []
end
- @nameservers ||= []
end
end
View
3  lib/whois/answer/parser/whois.za.org.rb
@@ -69,8 +69,9 @@ class WhoisZaOrg < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Domain Name Servers listed in order:\n\n((.+\n)+)\n/
$1.split("\n").map(&:strip).reject(&:empty?).compact
+ else
+ []
end
- @nameservers ||= []
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.