Module: RuboCop::Cop::RescueNode

Overview

Common functionality for checking `rescue` nodes.

Instance Method Summary collapse

Instance Method Details

#investigate(processed_source) ⇒ Object


7
8
9
10
11
12
# File 'lib/rubocop/cop/mixin/rescue_node.rb', line 7

def investigate(processed_source)
  @modifier_locations = processed_source
                        .tokens
                        .select(&:rescue_modifier?)
                        .map(&:pos)
end