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.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs