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 21
def [](key)
  store[key]
end
[]=(key, value) click to toggle source

@return [void]

# File lib/airbrake/rack/request_store.rb, line 16
def []=(key, value)
  store[key] = value
end
clear() click to toggle source

@return [void]

# File lib/airbrake/rack/request_store.rb, line 26
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 11
def store
  Thread.current[:airbrake] ||= {}
end