Here is a video on the technique:
https://www.youtube.com/watch?v=8lPuSRx7BTU
I would caution that the ruler should be firmly attached to the machine so it can’t slip under the needle. I would assume that if the plastic ruler ends up under the needle you will get to replace your needle, your ruler and possibly your sewing machine.