Class: ExceptionHunter::ErrorPresenter
- Inherits:
-
Object
- Object
- ExceptionHunter::ErrorPresenter
- Defined in:
- app/presenters/exception_hunter/error_presenter.rb
Defined Under Namespace
Classes: BacktraceLine
Instance Method Summary collapse
- #backtrace ⇒ Object
- #environment_data ⇒ Object
-
#initialize(error) ⇒ ErrorPresenter
constructor
A new instance of ErrorPresenter.
- #tracked_params ⇒ Object
Constructor Details
#initialize(error) ⇒ ErrorPresenter
Returns a new instance of ErrorPresenter.
8 9 10 |
# File 'app/presenters/exception_hunter/error_presenter.rb', line 8 def initialize(error) @error = error end |
Instance Method Details
#backtrace ⇒ Object
12 13 14 15 16 |
# File 'app/presenters/exception_hunter/error_presenter.rb', line 12 def backtrace (error.backtrace || []).map do |line| format_backtrace_line(line) end end |
#environment_data ⇒ Object
18 19 20 |
# File 'app/presenters/exception_hunter/error_presenter.rb', line 18 def environment_data error.environment_data&.except('params') || {} end |
#tracked_params ⇒ Object
22 23 24 |
# File 'app/presenters/exception_hunter/error_presenter.rb', line 22 def tracked_params (error.environment_data || {})['params'] end |