module Airbrake::Rack::RequestStore
RequestStore
is a thin (and limited) wrapper around Thread.current that allows writing and reading thread-local variables under the :airbrake
key. @api private @since v8.1.3
Public Class Methods
[](key)
click to toggle source
@return [Object]
# File lib/airbrake/rack/request_store.rb, line 23 def [](key) store[key] end
[]=(key, value)
click to toggle source
@return [void]
# File lib/airbrake/rack/request_store.rb, line 18 def []=(key, value) store[key] = value end
clear()
click to toggle source
@return [void]
# File lib/airbrake/rack/request_store.rb, line 28 def clear Thread.current[:airbrake] = {} end
store()
click to toggle source
@return [Hash] a hash for all request-related data
# File lib/airbrake/rack/request_store.rb, line 13 def store Thread.current[:airbrake] ||= {} end