class Rack::Evil
Public Class Methods
new(app)
click to toggle source
Lets you return a response to the client immediately from anywhere ( M V or C ) in the code.
# File lib/rack/contrib/evil.rb 6 def initialize(app) 7 @app = app 8 end
Public Instance Methods
call(env)
click to toggle source
# File lib/rack/contrib/evil.rb 10 def call(env) 11 catch(:response) { @app.call(env) } 12 end