class Legitbot::BotMatch
Represents a bot instance match. Typical methods are valid?
, fake?
and detected_as
Public Class Methods
fake?(ip)
click to toggle source
# File lib/legitbot/botmatch.rb, line 36 def self.fake?(ip) new(ip).fake? end
new(ip)
click to toggle source
# File lib/legitbot/botmatch.rb, line 16 def initialize(ip) @ip = ip end
valid?(ip)
click to toggle source
# File lib/legitbot/botmatch.rb, line 32 def self.valid?(ip) new(ip).valid? end
Public Instance Methods
detected_as()
click to toggle source
# File lib/legitbot/botmatch.rb, line 20 def detected_as self.class.name.split('::').last.downcase.to_sym end
fake?()
click to toggle source
# File lib/legitbot/botmatch.rb, line 28 def fake? !valid? end
valid?()
click to toggle source
# File lib/legitbot/botmatch.rb, line 24 def valid? valid_ip? && valid_domain? end