I have a Ruby Sinatra app and I have some code which I need to execute on all routes except for a few exceptions. How do I do this? If I wanted to execute the code on selected routes (whitelist style) I'd do this: ['/join', "/join/*", "/payment/*"].each do |path| before path do #some code end end How do I do it the other way round though (blacklist style)? I want to match all routes except '/join'
![in Sinatra how do you make a "before" filter that matches all routes except some](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)