class Object
Public Instance Methods
is_bot(user_agent, &block)
click to toggle source
# File lib/isbot.rb, line 28 def is_bot(user_agent, &block) return false if user_agent == nil user_agent.to_s.strip! match_data = user_agent.match(IsBot::regex) if block!=nil && match_data != nil block.call match_data return end match_data != nil end