Class: Rack::Evil
- Inherits:
-
Object
- Object
- Rack::Evil
- Defined in:
- lib/rack/contrib/evil.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Evil
constructor
Lets you return a response to the client immediately from anywhere ( M V or C ) in the code.
Constructor Details
#initialize(app) ⇒ Evil
Lets you return a response to the client immediately from anywhere ( M V or C ) in the code.
6 7 8 |
# File 'lib/rack/contrib/evil.rb', line 6 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 |
# File 'lib/rack/contrib/evil.rb', line 10 def call(env) catch(:response) { @app.call(env) } end |