Sha256: c0ff77fb51d32304340a55e68a63ef72638c236acdeebb0b7f0a66bf8f2d47ee
Contents?: true
Size: 357 Bytes
Versions: 11
Compression:
Stored size: 357 Bytes
Contents
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
11 entries across 11 versions & 4 rubygems