A stable democracy with regular free elections and a positive human rights record , the country has attracted considerable foreign investment and has earned one of Africa 's highest per capita incomes .