My best guess is some sort of old sewing device, possibly for canvas sails.
Its about 6 inches long. The top half slides towards the needle end and at the end of its travel a flat piece of metal slides in the cup of the needle past the hole.
IMG_0839.jpg