Skip to content

Commit

Permalink
Get rid of redundant constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
alaz committed Dec 20, 2016
1 parent 4f92119 commit 639e691
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 20 deletions.
4 changes: 0 additions & 4 deletions lib/legitbot/baidu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ module Legitbot
class Baidu < BotMatch
ValidDomains = ["baidu.com.", "baidu.jp."]

def initialize(ip, resolver_config = nil)
super(ip, resolver_config)
end

def valid?
subdomain_of?(*Baidu::ValidDomains)
end
Expand Down
4 changes: 0 additions & 4 deletions lib/legitbot/bing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ module Legitbot
class Bing < BotMatch
ValidDomains = ["search.msn.com."]

def initialize(ip, resolver_config = nil)
super(ip, resolver_config)
end

def valid?
subdomain_of?(*Bing::ValidDomains) && reverse_resolves?
end
Expand Down
4 changes: 0 additions & 4 deletions lib/legitbot/duckduckgo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ module Legitbot
class DuckDuckGo < BotMatch
ValidIPs = %w(72.94.249.34 72.94.249.35 72.94.249.36 72.94.249.37 72.94.249.38)

def initialize(ip, resolver_config = nil)
super(ip, resolver_config)
end

def valid?
DuckDuckGo::ValidIPs.include? @ip
end
Expand Down
4 changes: 0 additions & 4 deletions lib/legitbot/google.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ module Legitbot
class Google < BotMatch
ValidDomains = ["google.com.", "googlebot.com."]

def initialize(ip, resolver_config = nil)
super(ip, resolver_config)
end

def valid?
subdomain_of?(*Google::ValidDomains) && reverse_resolves?
end
Expand Down
4 changes: 0 additions & 4 deletions lib/legitbot/yandex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ module Legitbot
class Yandex < BotMatch
ValidDomains = ["yandex.ru.", "yandex.net.", "yandex.com."]

def initialize(ip, resolver_config = nil)
super(ip, resolver_config)
end

def valid?
subdomain_of?(*Yandex::ValidDomains) && reverse_resolves?
end
Expand Down

0 comments on commit 639e691

Please sign in to comment.