Instructions:
- Thoroughly drain the canned pineapple. Press out as much moisture as possible using a fine-mesh sieve lined with paper towels or cheesecloth. Set aside.
- In a medium saucepan, melt the butter over medium heat. Add the drained pineapple and granulated sugar. Cook, stirring occasionally, until the mixture thickens slightly and appears jammy (about 8-10 minutes). Remove from heat and let cool for 10 minutes.
- Once slightly cooled, whisk in the egg yolks one at a time until just combined. In a separate bowl, whisk together the flour, cinnamon, ginger, and salt.
- Gradually fold the dry ingredients into the pineapple mixture until a cohesive, slightly sticky 'dough' forms.
- Cover the bowl and refrigerate the mixture for at least 1 hour to firm up.
- Preheat oven to 350°F (175°C) if baking. Place coconut flakes in a shallow dish. Scoop rounded teaspoons of the chilled mixture and roll them tightly into 1-inch balls.
- Roll each ball generously in the coconut until fully coated. If baking, place balls on a parchment-lined baking sheet.
- Bake for 12–15 minutes until the edges are set but not deeply browned. Cool completely on the sheet before moving. (For the no-bake option, chill the rolled balls for 30 minutes to set instead of baking).