Created
March 15, 2014 14:02
-
-
Save psylone/9567778 to your computer and use it in GitHub Desktop.
This file contains 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
module App | |
class Root | |
def call env | |
[ 200, { 'Content-Type' => 'text/html' }, ["root page"] ] | |
end | |
end | |
class Info | |
def call env | |
[ 200, { 'Content-Type' => 'text/html' }, ["info page"] ] | |
end | |
end | |
end |
This file contains 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 './app' | |
map '/' do | |
run App::Root.new | |
end | |
map '/info' do | |
run App::Info.new | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment