I think the usual technical jargon for those things is "slotted optical switch"
There is an LED on one side and a photo diode on the other side. The connection diagram for this Sparkfun reflective sensor should work with your device also. I use what Sparkfun call an analog circuit to detect digital pulses using an interrupt.
I have salvaged a few of those slotted switches from old printers etc and they all seem to work with the same circuit.
...R