Sinatra Set Settings (Ruby)
- by JP
Using Sinatra in Ruby you can set the server's settings by doing:
set :myvariable, "MyValue"
and then access it anywhere in templates etc with settings.myvariable.
In my script I need to be able to re-set these variables falling back to a bunch of defaults. I figured the easiest way to do this would be to have a function that performs all the…