Class: Legitbot::Apple

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

Overview

Direct Known Subclasses

Apple_as_Google

Constant Summary collapse

Range =
IPAddr.new('17.0.0.0/8')

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)


9
10
11
12
# File 'lib/legitbot/apple.rb', line 9

def valid?
  ip = IPAddr.new @ip
  Range.include? ip
end