Class: Raven::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/raven/context.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContext

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

#extraObject (readonly)

Returns the value of attribute extra.



11
12
13
# File 'lib/raven/context.rb', line 11

def extra
  @extra
end

#rack_envObject

Returns the value of attribute rack_env.



12
13
14
# File 'lib/raven/context.rb', line 12

def rack_env
  @rack_env
end

#tagsObject (readonly)

Returns the value of attribute tags.



11
12
13
# File 'lib/raven/context.rb', line 11

def tags
  @tags
end

#userObject

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

.currentObject



3
4
5
# File 'lib/raven/context.rb', line 3

def self.current
  Thread.current[:sentry_context] ||= new
end