lib/human_power.rb
# Regular expression to match bot user agents.
Regular expression to match bot user agents.
Regular expression to match bot user agents .
def bot_regex
      @bot_regex ||= begin
        escaped_values = user_agents.values.map { |ua| Regexp.escape(ua) }
        /#{escaped_values.join("|")}/i
      end
    end
def bot_regex @bot_regex ||= begin escaped_values = user_agents . values . map { | ua | Regexp . escape ( ua ) } / #{ escaped_values . join ( "|" ) } /i end end
Regular expression to match bot user agents.
Regular expression to match bot user agents .