module Aliyun::Log::PerThreadRegistry

Public Class Methods

extended(object) click to toggle source
# File lib/aliyun/log/record/scope_registry.rb, line 6
def self.extended(object)
  object.instance_variable_set '@per_thread_registry_key', object.name.freeze
end

Public Instance Methods

instance() click to toggle source
# File lib/aliyun/log/record/scope_registry.rb, line 10
def instance
  Thread.current[@per_thread_registry_key] ||= new
end

Private Instance Methods

method_missing(name, *args, &block) click to toggle source
# File lib/aliyun/log/record/scope_registry.rb, line 16
def method_missing(name, *args, &block)
  singleton_class.delegate name, to: :instance

  send(name, *args, &block)
end