expose stopped? and close methods to ruby