Class: ShowExceptions
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
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.
4 5 6 |
# File 'lib/show_exceptions.rb', line 4 def initialize(app) @app = app end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
2 3 4 |
# File 'lib/show_exceptions.rb', line 2 def app @app end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
2 3 4 |
# File 'lib/show_exceptions.rb', line 2 def error @error end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/show_exceptions.rb', line 8 def call(env) begin @app.call(env) rescue StandardError => e render_exception(e) end end |