It looks inspired by express.js, is it the case or are they both inspired by an older framework?
Sinatra, also Ruby, predates Express and is based on Rack (in a similar way to Express, which used to be based on Connect if I’m not mistaken).
I’m not sure what inspired Sinatra, but that’s probably the influence you’re seeing in these frameworks.