Module: ColumnsTrace::Registry

Defined in:
lib/columns_trace/registry.rb

Overview

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

Class Method Summary collapse

Class Method Details

.clearObject



12
13
14
# File 'lib/columns_trace/registry.rb', line 12

def clear
  state.clear
end

.created_recordsObject



16
17
18
# File 'lib/columns_trace/registry.rb', line 16

def created_records
  state
end

.register(record, backtrace) ⇒ Object



8
9
10
# File 'lib/columns_trace/registry.rb', line 8

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