Sha256: 71790f7dfe65b70ee9bede213858b305aad477bd623e90ff2d2e5bda96a383ca
Contents?: true
Size: 712 Bytes
Versions: 37
Compression:
Stored size: 712 Bytes
Contents
# frozen_string_literal: true require "active_support/per_thread_registry" module ActiveRecord # This is a thread locals registry for Active Record. For example: # # ActiveRecord::RuntimeRegistry.connection_handler # # returns the connection handler local to the current thread. # # See the documentation of ActiveSupport::PerThreadRegistry # for further details. class RuntimeRegistry # :nodoc: extend ActiveSupport::PerThreadRegistry attr_accessor :sql_runtime [:sql_runtime].each do |val| class_eval %{ def self.#{val}; instance.#{val}; end }, __FILE__, __LINE__ class_eval %{ def self.#{val}=(x); instance.#{val}=x; end }, __FILE__, __LINE__ end end end
Version data entries
37 entries across 37 versions & 4 rubygems