class RuboCop::Cop::Rails::MatchRoute

def replacement(path_node, options_node)

def replacement(path_node, options_node)
  if path_node.hash_type?
    http_method, options = *http_method_and_options(path_node)
    "#{http_method} #{options.map(&:source).join(', ')}"
  elsif options_node.nil?
    "get #{path_node.source}"
  else
    http_method, options = *http_method_and_options(options_node)
    if options.any?
      "#{http_method} #{path_node.source}, #{options.map(&:source).join(', ')}"
    else
      "#{http_method} #{path_node.source}"
    end
  end
end