class RuboCop::Cop::Performance::MapMethodChain

def on_send(node)

def on_send(node)
  return if part_of_ignored_node?(node)
  return unless (map_arg = block_pass_with_symbol_arg?(node.first_argument))
  map_args = [map_arg]
  return unless (begin_of_chained_map_method = find_begin_of_chained_map_method(node, map_args))
  range = begin_of_chained_map_method.loc.selector.begin.join(node.source_range.end)
  message = format(MSG, method_name: begin_of_chained_map_method.method_name, map_args: map_args.join('.'))
  add_offense(range, message: message)
  ignore_node(node)
end