Sha256: a852dacccce32f3f07bc794c7a51a9014670c9ce51fda72d9075dfdb4ab1fa71
Contents?: true
Size: 574 Bytes
Versions: 5
Compression:
Stored size: 574 Bytes
Contents
# frozen_string_literal: true class Shoes class LoggerCollection def initialize @loggers = [] end def <<(logger) @loggers << logger self end def debug(message) forward(:debug, message) end def info(message) forward(:info, message) end def warn(message) forward(:warn, message) end def error(message) forward(:error, message) end private def forward(meth, message) @loggers.each do |logger| logger.public_send(meth, message) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems