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, line 4 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/rack/contrib/evil.rb, line 8 def call(env) catch(:response) { @app.call(env) } end