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.



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

#firstObject



8
9
10
# File 'lib/web_console/exception_mapper.rb', line 8

def first
  guess_the_first_application_binding || @bindings.first
end