Be sure to extract as much liquid as you can from the pineapple for optimal flavor - I used a potato masher to press it all out. The pineapple syrup will keep in the fridge for at least a week.
Combine the water and sugar in a saucepan. Bring to a boil; cook until sugar has dissolved, about 1 minute. Remove from heat and add pineapple. Cover and let sit 30 minutes. Strain, squeezing/smashing the pineapple to get as much liquid out of it as you can – you should end up with 1 cup of pineapple syrup. Keep refrigerated until ready to use.
Pour 2 tablespoons of pineapple syrup into each glass. Add 8 ounces of club soda and stir gently. Add rum, if desired. Top with a small scoop of vanilla ice cream.