Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: meister
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (15 sloc) 0.367 kB
# example file
# run with almost-rackup
class UpcaseMiddleware
def initialize(app)
@app = app
end
def call(env)
upcased = []
status, headers, body = @app.call(env)
body.each { |str| upcased << str.upcase }
[status, headers, upcased]
end
end
use UpcaseMiddleware
run proc { |e| [200, {'Content-Type' => 'text/plain'}, ['Hello World']] }
Jump to Line
Something went wrong with that request. Please try again.