The LED is a surface-mount type with leads soldered on by the distributor. Everything else was scrounged up from bits of brass strip and tubing from my scrap box. Leaving the wires to the signal lamp exposed would be typical. It's the same way that an 18-gauge, three-conductor cord to grade-crossing gate flashers are dealt with. I made the sun shield from a bit of brass tubing, filed to shape.
Trickiest part of this entire project was the getting the wiring into the brass tubing, then attaching it underneath the layout in such a way that it would not break.
Shortly after I posted the first photos of this project on nScale.net back in 2014, the LED went dark. I was pretty certain the LED had not blown, because I had three 1K-Ohm resistors in series with the anode. And I had voltage across them.
Now, before any purists chime in and start objecting to a smashboard swing gate in the Appalachians hollers, yes, I know at-grade junctions were rare in the Appalachians. But there was a least one where the Interstate RR (later the Southern Ry.) and Louisville & Nashville crossed paths in Wise County, Va. So I'm taking my modeler's license cue from that real-life scenario.
This bit of realistic operation effectively adds time to a typical mine run, making my small layout seem larger.