I am a complete noob to rack. I have 2 sinatra classes engine_a.rb and engine_b.rb
Want to pass the rackoptions using ru file like
$ rackup config.ru -O engine=a
I want to use a selective loading using rack similar to the following
require 'engine_a'
require 'engine_b'
if rackoption == a
run eng_a.new
else if rackoption == b
run eng_b.new
end
Please tell me if my analogy of doing the same is wrong. If not can somebody help me with a code that can help me realize the same behavior. I didnt get enough tutorials on these.
Also let me know if rack is the right tool to do it.