Class: OpenException::ExceptionOpener

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception, options = {}) ⇒ ExceptionOpener

Returns a new instance of ExceptionOpener.



40
41
42
43
# File 'lib/open_exception/open_exception.rb', line 40

def initialize(exception, options = {})
  @exception = exception.respond_to?(:original_exception) ? exception.original_exception || exception : exception
  @options = OpenException.options.merge(options)
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



38
39
40
# File 'lib/open_exception/open_exception.rb', line 38

def options
  @options
end

Instance Method Details

#openObject



45
46
47
# File 'lib/open_exception/open_exception.rb', line 45

def open
  extract_file_and_line && open_file unless exclude_exception?
end