module AdvancedBotDetection
Constants
- VERSION
Public Class Methods
bot?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 18 def bot?(user_agent_string) test(user_agent_string).bot? end
browser?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 22 def browser?(user_agent_string) test(user_agent_string).browser? end
checker?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 26 def checker?(user_agent_string) test(user_agent_string).checker? end
crawler?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 38 def crawler?(user_agent_string) test(user_agent_string).crawler? end
downloader?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 30 def downloader?(user_agent_string) test(user_agent_string).downloader? end
human?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 14 def human?(user_agent_string) test(user_agent_string).human? end
mobile?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 58 def mobile?(user_agent_string) test(user_agent_string).mobile? end
mobile_browser?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 46 def mobile_browser?(user_agent_string) test(user_agent_string).mobile_browser? end
phone?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 54 def phone?(user_agent_string) test(user_agent_string).phone? end
proxy?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 34 def proxy?(user_agent_string) test(user_agent_string).proxy? end
root()
click to toggle source
# File lib/advanced_bot_detection.rb, line 9 def root require 'pathname' Pathname.new File.expand_path '..', File.dirname(__FILE__) end
spam?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 42 def spam?(user_agent_string) test(user_agent_string).spam? end
tablet?(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 50 def tablet?(user_agent_string) test(user_agent_string).tablet? end
Private Class Methods
test(user_agent_string)
click to toggle source
# File lib/advanced_bot_detection.rb, line 64 def test(user_agent_string) AdvancedBotDetection::Test.new(user_agent_string) end