Method: RuboCop::Cop::Lint::EmptyWhen#on_case
- Defined in:
- lib/rubocop/cop/lint/empty_when.rb
#on_case(node) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/rubocop/cop/lint/empty_when.rb', line 28 def on_case(node) node.each_when do |when_node| next if when_node.body add_offense(when_node, location: when_node.source_range) end end |