Class: Raven::Context
- Inherits:
-
Object
- Object
- Raven::Context
- Defined in:
- lib/raven/context.rb
Instance Attribute Summary collapse
-
#extra ⇒ Object
readonly
Returns the value of attribute extra.
-
#rack_env ⇒ Object
Returns the value of attribute rack_env.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize ⇒ Context
Returns a new instance of Context.
14 15 16 17 18 19 |
# File 'lib/raven/context.rb', line 14 def initialize @extra = {} @tags = {} @user = {} @rack_env = nil end |
Instance Attribute Details
#extra ⇒ Object (readonly)
Returns the value of attribute extra.
11 12 13 |
# File 'lib/raven/context.rb', line 11 def extra @extra end |
#rack_env ⇒ Object
Returns the value of attribute rack_env.
12 13 14 |
# File 'lib/raven/context.rb', line 12 def rack_env @rack_env end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
11 12 13 |
# File 'lib/raven/context.rb', line 11 def @tags end |
#user ⇒ Object
Returns the value of attribute user.
12 13 14 |
# File 'lib/raven/context.rb', line 12 def user @user end |
Class Method Details
.clear! ⇒ Object
7 8 9 |
# File 'lib/raven/context.rb', line 7 def self.clear! Thread.current[:sentry_context] = nil end |
.current ⇒ Object
3 4 5 |
# File 'lib/raven/context.rb', line 3 def self.current Thread.current[:sentry_context] ||= new end |