This is based off of a Ruhmkorff or induction coil design. It is a way to make alternating current (probably a square wave). I cannot guarantee that this will work, but it's based off of an induction coil design so it should work.
At this point, you will need to wrap several turns of heavier gauge wire around the steel bar (it must be able to magnetize well- so experiment with this). If you are making an induction coil, you would,at this point, wrap the secondary coil on the outside of the primary coil with thin wire for high voltage output.
The mechanism works this way: a piece of magnetic metal (iron or steel) is attracted to the magnetic field the electromagnet produces on the steel/iron core of the coil. It pulls a small arm connected in the circuit, thus turning off the power. It then somehow has to return to the circuit (rubber bands or using gravity to pull it down by having the mechanism upside-down) which will turn the circuit back on, magnetizing the core and switching the circuit off, and so on and so forth. This is why a square wave is probably produced. In summary, the circuit activates the electromagnet and turns itself off. Once the magnetic field is gone, it switches back on.