Cabbie clubbed with hammer in robbery attempt