Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created October 20, 2009 07:15
Show Gist options
  • Save jugyo/214084 to your computer and use it in GitHub Desktop.
Save jugyo/214084 to your computer and use it in GitHub Desktop.
module Rack
class Foo
def initialize app
@app = app
end
def call(env)
[200, { 'Content-Type' => 'text/html' }, 'OK']
end
end
end
use Rack::Foo
app = lambda { |env| [200, { 'Content-Type' => 'text/html' }, 'Hello World'] }
run app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment