Casper Ruud had the perfect French Open preparation, beating Tomas Machac in straight sets to win the Geneva Open.