class UserAgent::Browsers::Base
def bot?
def bot? # If UA has no application type, its probably generated by a # shitty bot. if application.nil? true # Match common case when bots refer to themselves as bots in # the application comment. There are no standards for how bots # should call themselves so its not an exhaustive method. # # If you want to expand the scope, override the method and # provide your own regexp. Any patches to future extend this # list will be rejected. elsif comment = application.comment comment.any? { |c| c =~ /bot/i } elsif product = application.product product.include?('bot') else false end end