Method: RuboCop::Cop::Lint::RescueException#on_resbody
- Defined in:
- lib/rubocop/cop/lint/rescue_exception.rb
#on_resbody(node) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/rubocop/cop/lint/rescue_exception.rb', line 12 def on_resbody(node) return unless node.children.first rescue_args = node.children.first.children return unless rescue_args.any? { |a| targets_exception?(a) } add_offense(node, :expression) end |