Commit 951c6dd2 authored by Piotr Skorupa's avatar Piotr Skorupa

Make rubocop happy

parent 17d1c421
......@@ -36,11 +36,11 @@ module RuboCop
return unless Array(one_level_matches).any? || Array(two_level_matches).any?
if two_level_matches
class_name = "#{two_level_matches[0].first}::#{two_level_matches[1].first}".to_sym
else
class_name = one_level_matches[0].first
end
class_name = if two_level_matches
"#{two_level_matches[0].first}::#{two_level_matches[1].first}".to_sym
else
one_level_matches[0].first
end
if large_table?(class_name)
add_offense(node, location: :expression, message: format(MSG, model_name: class_name))
......
......@@ -10,7 +10,7 @@ RSpec.describe RuboCop::Cop::UsageData::HistogramWithLargeTable do
let(:config) do
RuboCop::Config.new('UsageData/HistogramWithLargeTable' => {
'HighTrafficModels' => high_traffic_models,
'HighTrafficModels' => high_traffic_models
})
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment