A man was taken to hospital after being hit in the face by what is thought to have been a catapult outside a pub.