Class variables in Rack middleware

I see a lot of class variables used in Rack middleware, and this is
probably the only place I see them used anymore. In each case, it seems
to me that a class instance variable would’ve done the trick too, so is
there some reason for using a class variable in the case of rack
middleware that is better, or is it just less typing for the dev?

Any insights shared will be much appreciated.