Skip to content

Instantly share code, notes, and snippets.

@cypher
Created March 11, 2010 17:28
Show Gist options
  • Save cypher/329389 to your computer and use it in GitHub Desktop.
Save cypher/329389 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