code_junkie

What's the fastest way for a true sinatra(ruby/rack) after_filter

Nov 14th, 2011
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. def call(env)
  2. @before.each {|c| c.call(env) }
  3. response = @app.call(env)
  4. @after.each {|c| c.call(env) }
  5. response
  6. #i am guessing when this method returns then the response is sent to the client.
  7. end
Add Comment
Please, Sign In to add comment