Sha256: 0f62faa01fcd2ac5a2d66f7a58f1054af1c708227d307ebb5f80e236f39febca
Contents?: true
Size: 746 Bytes
Versions: 18
Compression:
Stored size: 746 Bytes
Contents
# frozen_string_literal: true require "logger" ## module MIME ## class Types class << self # Configure the MIME::Types logger. This defaults to an instance of a # logger that passes messages (unformatted) through to Kernel#warn. attr_accessor :logger end class WarnLogger < ::Logger # :nodoc: class WarnLogDevice < ::Logger::LogDevice # :nodoc: def initialize(*) end def write(m) Kernel.warn(m) end def close end end def initialize(_one, _two = nil, _three = nil) super nil @logdev = WarnLogDevice.new @formatter = ->(_s, _d, _p, m) { m } end end self.logger = WarnLogger.new(nil) end end
Version data entries
18 entries across 18 versions & 6 rubygems