Class: ShowExceptions
- Inherits:
-
Object
- Object
- ShowExceptions
- Defined in:
- lib/railz_lite/controllers/show_exceptions.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ ShowExceptions
constructor
A new instance of ShowExceptions.
Constructor Details
#initialize(app) ⇒ ShowExceptions
Returns a new instance of ShowExceptions.
6 7 8 |
# File 'lib/railz_lite/controllers/show_exceptions.rb', line 6 def initialize(app) @app = app end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
4 5 6 |
# File 'lib/railz_lite/controllers/show_exceptions.rb', line 4 def app @app end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 |
# File 'lib/railz_lite/controllers/show_exceptions.rb', line 10 def call(env) app.call(env) rescue Exception => e render_exception(e) end |