Class: Bugwatch::ExceptionData
- Inherits:
-
Object
- Object
- Bugwatch::ExceptionData
- Defined in:
- lib/bugwatch/exception_data.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #file ⇒ Object
- #files ⇒ Object
-
#initialize(opts = {}) ⇒ ExceptionData
constructor
A new instance of ExceptionData.
- #line ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ ExceptionData
Returns a new instance of ExceptionData.
37 38 39 40 |
# File 'lib/bugwatch/exception_data.rb', line 37 def initialize(opts={}) @type = opts[:type] @backtrace = opts[:backtrace] || [] end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
35 36 37 |
# File 'lib/bugwatch/exception_data.rb', line 35 def backtrace @backtrace end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
35 36 37 |
# File 'lib/bugwatch/exception_data.rb', line 35 def type @type end |
Instance Method Details
#file ⇒ Object
42 43 44 |
# File 'lib/bugwatch/exception_data.rb', line 42 def file files.first end |
#files ⇒ Object
51 52 53 |
# File 'lib/bugwatch/exception_data.rb', line 51 def files backtrace.map(&:first) end |
#line ⇒ Object
46 47 48 49 |
# File 'lib/bugwatch/exception_data.rb', line 46 def line _, line = backtrace.first line.to_i if line end |