Class: OpenException::ExceptionOpener
- Inherits:
-
Object
- Object
- OpenException::ExceptionOpener
- Defined in:
- lib/open_exception/open_exception.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(exception, options = {}) ⇒ ExceptionOpener
constructor
A new instance of ExceptionOpener.
- #open ⇒ Object
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, = {}) @exception = exception.respond_to?(:original_exception) ? exception.original_exception || exception : exception @options = OpenException..merge() end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
38 39 40 |
# File 'lib/open_exception/open_exception.rb', line 38 def @options end |
Instance Method Details
#open ⇒ Object
45 46 47 |
# File 'lib/open_exception/open_exception.rb', line 45 def open extract_file_and_line && open_file unless exclude_exception? end |