Class: WebConsole::ExceptionMapper
- Inherits:
-
Object
- Object
- WebConsole::ExceptionMapper
- Defined in:
- lib/web_console/exception_mapper.rb
Instance Method Summary collapse
- #[](index) ⇒ Object
- #first ⇒ Object
-
#initialize(exception) ⇒ ExceptionMapper
constructor
A new instance of ExceptionMapper.
Constructor Details
#initialize(exception) ⇒ ExceptionMapper
Returns a new instance of ExceptionMapper.
3 4 5 6 |
# File 'lib/web_console/exception_mapper.rb', line 3 def initialize(exception) @backtrace = exception.backtrace @bindings = exception.bindings end |
Instance Method Details
#[](index) ⇒ Object
12 13 14 |
# File 'lib/web_console/exception_mapper.rb', line 12 def [](index) guess_binding_for_index(index) || @bindings[index] end |
#first ⇒ Object
8 9 10 |
# File 'lib/web_console/exception_mapper.rb', line 8 def first guess_the_first_application_binding || @bindings.first end |