Module: Airbrake::Rack::RequestStore Private
- Defined in:
- lib/airbrake/rack/request_store.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
RequestStore is a thin (and limited) wrapper around Thread.current that allows writing and reading thread-local variables under the :airbrake
key.
Class Method Summary collapse
- .[](key) ⇒ Object private
- .[]=(key, value) ⇒ void private
- .clear ⇒ void private
-
.store ⇒ Hash
private
A hash for all request-related data.
Class Method Details
.[](key) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/airbrake/rack/request_store.rb', line 23 def [](key) store[key] end |
.[]=(key, value) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
18 19 20 |
# File 'lib/airbrake/rack/request_store.rb', line 18 def []=(key, value) store[key] = value end |
.clear ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
28 29 30 |
# File 'lib/airbrake/rack/request_store.rb', line 28 def clear Thread.current[:airbrake] = {} end |
.store ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a hash for all request-related data.
13 14 15 |
# File 'lib/airbrake/rack/request_store.rb', line 13 def store Thread.current[:airbrake] ||= {} end |