Class: RedmineAirbrakeBackend::BacktraceElement
- Inherits:
-
Object
- Object
- RedmineAirbrakeBackend::BacktraceElement
- Defined in:
- lib/redmine_airbrake_backend/backtrace_element.rb
Overview
Backtrace element received by airbrake
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#function ⇒ Object
readonly
Returns the value of attribute function.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
- #checksum ⇒ Object
-
#initialize(data) ⇒ BacktraceElement
constructor
A new instance of BacktraceElement.
Constructor Details
#initialize(data) ⇒ BacktraceElement
Returns a new instance of BacktraceElement.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/redmine_airbrake_backend/backtrace_element.rb', line 9 def initialize(data) # File @file = data[:file].presence # Line @line = data[:line].presence # Function @function = data[:function].presence # Column @column = data[:column].presence end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
7 8 9 |
# File 'lib/redmine_airbrake_backend/backtrace_element.rb', line 7 def column @column end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
7 8 9 |
# File 'lib/redmine_airbrake_backend/backtrace_element.rb', line 7 def file @file end |
#function ⇒ Object (readonly)
Returns the value of attribute function.
7 8 9 |
# File 'lib/redmine_airbrake_backend/backtrace_element.rb', line 7 def function @function end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
7 8 9 |
# File 'lib/redmine_airbrake_backend/backtrace_element.rb', line 7 def line @line end |
Instance Method Details
#checksum ⇒ Object
23 24 25 |
# File 'lib/redmine_airbrake_backend/backtrace_element.rb', line 23 def checksum @_checksum ||= Digest::MD5.hexdigest("#{@file}|#{normalize_function_name(@function)}|#{@line}|#{@column}") end |