Sha256: eb29a2e4dafcc805cfc0f07be2e45b8b181693c523c21a910df72cbf150b9454
Contents?: true
Size: 368 Bytes
Versions: 13
Compression:
Stored size: 368 Bytes
Contents
# frozen_string_literal: true require 'logger' class LoggerHolder private_class_method :new @instance_mutex = Mutex.new attr_reader :logger def initialize @logger = Logger.new(STDOUT) end def self.instance return @instance.logger if @instance @instance_mutex.synchronize do @instance ||= new end @instance.logger end end
Version data entries
13 entries across 13 versions & 4 rubygems