You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
It allowed him to seize back the heavyweight world championship belts he lost to his Mexican-American opponent in a shock upset last June.
The Clash on the Dunes' in Diriyah was for the IBF, WBA, WBO and IBO titles and Joshua dictated the pace from the start with a measured approach that showed he had learned from the mistakes of the past.
Going into the 12th and final round, Ruiz needed a knockout to pull off another upset but it never came.
The judges scored the fight 118-110, 118-110 and 119-109 to the 30-year-old Briton.
"It was his night, man," said Ruiz as his six-month reign came to an end, calling also for a third encounter that Joshua seemed to welcome.
"If you heard, we're going to do it a third," said the taller and more athletic Briton.
California-based Ruiz had stopped the previously undefeated champion in the seventh round at New York's Madison Square Garden last June.
Joshua described that shock defeat, to a flabby-looking opponent drafted in as a late replacement, as no more than a 'minor setback' and he was happy to make light of it again in victory.
"Man, the first time was so nice, I had to do it twice," he told the crowd.
"I'm used to knocking guys out but last time I realised 'hang on a minute, I hurt the man and I got caught coming in'. I gave the man his credit. I said to myself I'm going to correct myself and come again."
Another loss in the early hours of Sunday would have sent the 2012 Olympic super-heavyweight champion's career into freefall, with some saying already after the last fight that the Briton was finished.
He had shown with his preparations, however, that he meant business - stepping into the ring lighter than ever and giving away more than three stones to Ruiz who had weighed in considerably heavier than in their first showdown.
"You know the saying 'Stay hungry, stay humble'," said Joshua. "I'm humble in defeat and I'm going to remain humble in victory."
Ruiz said he would do it differently next time.
"I think I didn't prepare it how I should have. I gained too much weight but I don't want to give no excuses. He won, he boxed me around. If we do the third, I'm going to get in the best shape of my life."