Class: Sentry::ThreadsInterface
- Defined in:
- lib/sentry/interfaces/threads.rb
Instance Attribute Summary collapse
-
#stacktrace ⇒ Object
Returns the value of attribute stacktrace.
Instance Method Summary collapse
-
#initialize(crashed: false) ⇒ ThreadsInterface
constructor
A new instance of ThreadsInterface.
- #to_hash ⇒ Object
Constructor Details
#initialize(crashed: false) ⇒ ThreadsInterface
Returns a new instance of ThreadsInterface.
5 6 7 8 9 10 |
# File 'lib/sentry/interfaces/threads.rb', line 5 def initialize(crashed: false) @id = Thread.current.object_id @name = Thread.current.name @current = true @crashed = crashed end |
Instance Attribute Details
#stacktrace ⇒ Object
Returns the value of attribute stacktrace.
3 4 5 |
# File 'lib/sentry/interfaces/threads.rb', line 3 def stacktrace @stacktrace end |
Instance Method Details
#to_hash ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/sentry/interfaces/threads.rb', line 12 def to_hash { values: [ { id: @id, name: @name, crashed: @crashed, current: @current, stacktrace: @stacktrace&.to_hash } ] } end |