class RuboCop::Cop::Performance::CompareWithBlock

def message(send, method, var_a, var_b, args)

rubocop:disable Metrics/MethodLength
def message(send, method, var_a, var_b, args)
  compare_method     = send.method_name
  replacement_method = REPLACEMENT[compare_method]
  if method == :[]
    key = args.first
    instead = " { |a| a[#{key.source}] }"
    str_a = "#{var_a}[#{key.source}]"
    str_b = "#{var_b}[#{key.source}]"
  else
    instead = "(&:#{method})"
    str_a = "#{var_a}.#{method}"
    str_b = "#{var_b}.#{method}"
  end
  format(MSG, compare_method: compare_method,
              replacement_method: replacement_method,
              instead: instead,
              var_a: var_a,
              var_b: var_b,
              str_a: str_a,
              str_b: str_b)
end