Method: RuboCop::Cop::Lint::EmptyInPattern#on_case_match

Defined in:
lib/rubocop/cop/lint/empty_in_pattern.rb

#on_case_match(node) ⇒ Object



53
54
55
56
57
58
59
60
# File 'lib/rubocop/cop/lint/empty_in_pattern.rb', line 53

def on_case_match(node)
  node.in_pattern_branches.each do |branch|
    next if branch.body
    next if cop_config['AllowComments'] && contains_comments?(branch)

    add_offense(branch)
  end
end