Spain took the lead in the fourth minute of the contest, with Joselu, who was brought in to lead the line, heading a cross from Lamine Yamal just past the line.
Switzerland thought that they had levelled in the seventh minute through Becir Omeragic, but his effort was disallowed due to a Remo Freuler handball in the build-up.
The home side's evening went from bad to worse in the 13th minute, with Ruiz making it 2-0, as the midfielder converted into the back of the net after Nico Williams had brought a save from Gregor Kobel.
However, Spain were reduced to 10 men in the 20th minute when Robin Le Normand was sent off for pulling Breel Embolo to the ground when the striker was advancing on goal.
The red card saw Dani Vivian introduced and Pedri substituted, as La Roja boss Luis de la Fuente looked to tighten his side up, but Switzerland were pressing, and they had one back in the 41st minute through Zeki Amdouni, who converted a knockdown from the lively Embolo.
However, Spain secured the points in the 77th minute when Ruiz converted a low cross from Ferran Torres to make it 3-1 to the reigning Nations League champions, before the latter got his name on the scoresheet by finishing under the onrushing Kobel after more suspect defending.
Spain are second in Group 4 of League A on four points, two points behind the leaders Denmark, while Switzerland are at the bottom, having lost both of their fixtures.
SWITZERLAND VS. SPAIN HIGHLIGHTS
4th min: Switzerland 0-1 Spain (Joselu)
Spain make the breakthrough in the fourth minute of the contest, as Joselu heads a cross from Yamal into the back of the net.
Switzerland goalkeeper Kobel thought that he had kept the ball out, but the referee's watch buzzed to indicate that it had crossed the line, sparking celebrations from the team in yellow.
13th min: Switzerland 0-2 Spain (Fabian Ruiz)
Spain double their advantage in the 13th minute of the contest, as Ruiz smashes into the back of the net from close range after Nico Williams had seen his effort saved by Kobel.
Yamal was again involved in the build-up for the European champions.
20th min: Robin Le Normand (Spain) red card
Spain are reduced to 10 men in the 20th minute of the match, with Le Normand given a straight red card for pulling Embolo down when the striker was through on goal.
41st min: Switzerland 1-2 Spain (Zeki Amdouni)
Switzerland get themselves back in the match in the latter stages of the first period, as Amdouni turns into the back of the net from close range after Embolo had flicked a corner into a dangerous area.
77th min: Switzerland 1-3 Spain (Fabian Ruiz)
Spain have their third on the night and Ruiz has his second.
Torres races down the right before delivering a low cross into the midfielder, who expertly finishes into the bottom corner to give Switzerland a mountain to climb.
80th min: Switzerland 1-4 Spain (Ferran Torres)
Spain score a fourth, with Torres getting his name on the scoresheet courtesy of a cool finish under the onrushing goalkeeper; Switzerland's defence are having a tough end to this match.
MAN OF THE MATCH - FABIAN RUIZ
Joselu deserves a mention here, as the striker was brilliant, scoring once and providing one assist, but the man-of-the-match award simply had to be handed to Spain's excellent midfielder Ruiz.
The 28-year-old came up with a brace during an all-action performance, while he finished with a pass success rate of 92%.
Ruiz was more than prepared to help out his defence when La Roja went down to 10 men, but his best work came further forward, and it was an outstanding display from the Paris Saint-Germain midfielder.
SWITZERLAND VS. SPAIN MATCH STATS
Possession: Switzerland 60%-40% Spain
Shots: Switzerland 18-10 Spain
Shots on target: Switzerland 3-8 Spain
Corners: Switzerland 9-3 Spain
Fouls: Switzerland 10-9 Spain
BEST STATS
WHAT NEXT?
Spain will be bidding to move onto seven points in Group 4 of League A when they welcome Denmark on October 12, before hosting Serbia three days later.
Switzerland, meanwhile, will be aiming to bounce back from successive defeats in the section when they head to Serbia on October 12, with their second game of next month then taking place at home to Denmark.