class BotChecker::Checker

Public Instance Methods

bot?(user_agent = nil) click to toggle source
# File lib/bot_checker/checker.rb, line 3
def bot?(user_agent = nil)
  return false if user_agent.nil?

  bot_list = BotChecker::Lister.new

  WILD_CARDS.any? { |wc| user_agent.downcase.include?(wc) } || bot_list.include?(user_agent)
end