Skip to content

Instantly share code, notes, and snippets.

@leehambley
Forked from cypher/middleware.rb
Created March 11, 2010 17:30
Show Gist options
  • Save leehambley/329390 to your computer and use it in GitHub Desktop.
Save leehambley/329390 to your computer and use it in GitHub Desktop.
class MyMiddleware
def self.call(env)
new({:a => 'b'}).call(env)
end
def initialize(config)
@config = config
end
def call(env)
# do your stuff here
end
end
use MyMiddleware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment