Class: Legitbot::Yandex

Inherits:
BotMatch show all
Defined in:
lib/legitbot/yandex.rb

Overview

Constant Summary collapse

ValidDomains =
["yandex.ru.", "yandex.net.", "yandex.com."]

Instance Method Summary collapse

Methods inherited from BotMatch

#detected_as, #fake?, fake?, #initialize, #reverse_domain, #reverse_name, #reverse_resolves?, #reversed_ip, #subdomain_of?, valid?

Constructor Details

This class inherits a constructor from Legitbot::BotMatch

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/legitbot/yandex.rb', line 7

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