module RuboCop::Cop::IndexMethod

def on_send(node)

def on_send(node)
  on_bad_map_to_h(node) do |*match|
    handle_possible_offense(node, match, 'map { ... }.to_h')
  end
  on_bad_hash_brackets_map(node) do |*match|
    handle_possible_offense(node, match, 'Hash[map { ... }]')
  end
end