It depends on the coil design. Many are replaceable but there are a few that are not. Many coils the lead is simple pushed in onto a pin cup or sometimes the pin is a screw in the cup. Either way they are normally cemented in place on some like the Briggs and Kohler coils. I replace several leads every year where mice most times have the lead in two. In the case of the above the lead appears to be the screw in type with a rubber boot sealing the area.

As for Ryobi I don't know the specific coil used so it may or may not be replaceable. If replaceable usually there will a cup where the lead goes into the coil. Easy to determine if replaceable as the lead will have this plastic cup the lead goes into otherwise the epoxy of the coil will the same all over the area with lead coming out of it.

As mention above many coils lead can replaced but it takes a little work to get the old lead out if glued in place and to all the glue out.

If you post the Ryobi model number I see if can find a picture of the coil to look at lead area.