ActiveSupport::CurrentAttributes
Constants
Flat compile-time registry of declared attributes: {class name, attribute name, attribute type}. A per-class constant can't be read back by a later macro expansion of the same class body, so per-class lists live here, keyed by name (same idiom as ActionController::FILTERS).
Compile-time registry of all CurrentAttributes subclasses
(filled by macro inherited), consumed by reset_all — the
top-level macro finished below generates it after every class
in the program is defined.
Class methods
Rails' Executor semantics: reset every CurrentAttributes class. Called by the request dispatcher (railties_cr) between requests — resets the CURRENT fiber's storage (request dispatch and its renders run on the same fiber).
Macros
Declare typed attributes: attribute user: User?, request: HTTP::Request?.
Generates class-level getter/setter per attribute plus self.reset
(nils every attribute of this class, across all attribute calls).