Skip to content

Instantly share code, notes, and snippets.

@rtomayko
Created December 18, 2008 21:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rtomayko/37668 to your computer and use it in GitHub Desktop.
Save rtomayko/37668 to your computer and use it in GitHub Desktop.
class App1 < Sinatra::Base
set :views, "/path/to/views"
set :public, "/path/to/static/files"
def strong(text)
"<strong>#{text}</strong>"
end
get '/' do
strong "Hello World"
end
end
class App2 < Sinatra::Base
set :views, "/path/to/more/views"
set :public, "/path/to/more/static/files"
def em(text)
"<em>#{text}</em>"
end
get '/' do
em "Hello World"
end
end
class Middleware < Sinatra::Base
get '/foo/bar' do
@app.call(env)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment