Class: Aesop::Rails::Middleware
- Inherits:
-
Object
- Object
- Aesop::Rails::Middleware
- Defined in:
- lib/aesop/rails/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app) ⇒ Middleware
Returns a new instance of Middleware.
4 5 6 |
# File 'lib/aesop/rails/middleware.rb', line 4 def initialize( app ) @app = app end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/aesop/rails/middleware.rb', line 8 def call( env ) begin response = @app.call(env) rescue Exception => e Aesop::Aesop.instance.catch_exception(e) end response end |