This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
README.md | ||
| |
Rakefile | ||
| |
VERSION | ||
| |
example_app.rb | ||
| |
examples.rb | Tue Nov 03 16:44:18 -0800 2009 | |
| |
lib/ |
README.md
Sinatra Scopes
Simple scoping for your request handlers. From example_app.rb:
scope :project, '/projects/*' do |project_id|
@project = Project[project_id]
end
project.get '/users/*' do |user_id|
@user = User[user_id]
"#{@project}, #{@user}"
end
Scopes don't have to specify a path pattern:
scope(:authorized) { auth }
authorized.get '/sekret/*' do |page|
page
end








