Module: ColumnsTrace::Registry

Defined in:
lib/columns_trace/registry.rb

Overview

Note: can use ActiveSupport::IsolatedExecutionState instead of this module for rails 7.0+.

Defined Under Namespace

Classes: Entry

Class Method Summary collapse

Class Method Details

.clearObject



14
15
16
# File 'lib/columns_trace/registry.rb', line 14

def clear
  state.clear
end

.entriesObject



18
19
20
# File 'lib/columns_trace/registry.rb', line 18

def entries
  state
end

.register(record, backtrace) ⇒ Object



10
11
12
# File 'lib/columns_trace/registry.rb', line 10

def register(record, backtrace)
  state << Entry.new(record.class, record, backtrace)
end