Class: WebConsole::ExceptionMapper

Inherits:
Object
  • Object
show all
Defined in:
lib/web_console/exception_mapper.rb

Instance Method Summary collapse

Constructor Details

#initialize(exception) ⇒ ExceptionMapper

Returns a new instance of ExceptionMapper.



5
6
7
8
# File 'lib/web_console/exception_mapper.rb', line 5

def initialize(exception)
  @backtrace = exception.backtrace
  @bindings = exception.bindings
end

Instance Method Details

#[](index) ⇒ Object



14
15
16
# File 'lib/web_console/exception_mapper.rb', line 14

def [](index)
  guess_binding_for_index(index) || @bindings[index]
end

#firstObject



10
11
12
# File 'lib/web_console/exception_mapper.rb', line 10

def first
  guess_the_first_application_binding || @bindings.first
end