Preheat oven to 190C/375F.
Cut the pastry into four pieces. Roll out on a floured surface until the pastry is a couple of millimetres thick. Spoon 3 tablespoons of frangipane into the centre of the pastry and gently spread out using the back of a spoon so that it's about 10 centimetres wide.
Cut the rhubarb into short lengths, not quite as wide as the frangipane. Toss in the maple syrup and lay on top of the frangipane. Trim the edges of the pastry so that you have a neatish border of a few centimetres around the frangipane. Fold the pastry in and press it down to seal the edges. Repeat for the rest of the pastry. Place on a lined baking sheet. Chill for at least 30 minutes if possible.
Brush the edges of the pastry with beaten egg. Sprinkle with demerara sugar and place in the oven. Bake for about 25 minutes until the edges of the pastry are golden brown and crisp and the frangipane is set. Serve warm with ice cream.