Created
July 1, 2009 02:01
-
-
Save jedediah/138553 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'sinatra/strands' | |
require 'haml' | |
helpers do | |
def message locals={} | |
haml :message, | |
:locals => {:uri => strand_uri }.merge(locals) | |
end | |
end | |
strand_get '/' do | |
show message :text => "Step 1: click this button", :button => "ok" | |
show message :text => "Step 2: click it again", :button => "yup" | |
show message :text => "Step 3: one more time baby", :button => "oh yeah" | |
message :text => "Ok, you're done", :button => "again", :uri => '/' | |
end | |
__END__ | |
@@ message | |
%html | |
%head | |
%title A Poignant Message From The Internet | |
%body | |
%h1= text | |
%a{:href => uri, :style => "border: 1px solid black; padding: 10px" }= button |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment