Skip to content

Commit

Permalink
🚨 fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alaz committed Jul 27, 2020
1 parent 1ab1359 commit 553e9e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/legitbot/legitbot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class << self
# otherwise.
# :yields: a found bot
#
# rubocop:disable Metrics/CyclomaticComplexity
def self.bot(user_agent, ip)
bots = @rules
.select { |rule| rule[:fragments].any? { |f| user_agent.index f } }
Expand All @@ -32,6 +33,7 @@ def self.bot(user_agent, ip)
selected
end
end
# rubocop:enable Metrics/CyclomaticComplexity

def self.rule(clazz, fragments)
@rules << { class: clazz, fragments: fragments }
Expand Down

0 comments on commit 553e9e9

Please sign in to comment.