From what I can see, and from your description, it seems that it could be some form of variable resistance device, possibly a rheostat or potentiometer.
In that configuration, I would suggest it was set up for experimentation rather than use as a component in some electrical circuit.