Class: ExceptionViewer
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
-
#res ⇒ Object
readonly
Returns the value of attribute res.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ ExceptionViewer
constructor
A new instance of ExceptionViewer.
Constructor Details
#initialize(app) ⇒ ExceptionViewer
Returns a new instance of ExceptionViewer.
4 5 6 7 8 |
# File 'lib/laris/exception_viewer.rb', line 4 def initialize(app) @app = app @res = Rack::Response.new @exception = nil end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
2 3 4 |
# File 'lib/laris/exception_viewer.rb', line 2 def app @app end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
2 3 4 |
# File 'lib/laris/exception_viewer.rb', line 2 def exception @exception end |
#res ⇒ Object (readonly)
Returns the value of attribute res.
2 3 4 |
# File 'lib/laris/exception_viewer.rb', line 2 def res @res end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/laris/exception_viewer.rb', line 10 def call(env) begin app.call(env) rescue => e @exception = e exception_page end end |