Skip to content

Instantly share code, notes, and snippets.

@maceto
Created December 14, 2011 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maceto/1478697 to your computer and use it in GitHub Desktop.
Save maceto/1478697 to your computer and use it in GitHub Desktop.
class TransactionRequest
def initializer(app)
@app = app
@regex = /Regex/
end
def call(env)
if @regex.test env['REQUEST_URI']
#proceso la transacción
else
#dejo que siga a la applicación
@app.call(env)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment