class RuboCop::Cop::Performance::MapCompact
def on_send(node)
def on_send(node) return unless (map_node = map_compact(node)) compact_loc = node.loc range = range_between(map_node.loc.selector.begin_pos, compact_loc.selector.end_pos) add_offense(range) do |corrector| corrector.replace(map_node.loc.selector, 'filter_map') remove_compact_method(corrector, map_node, node, node.parent) end end