Sha256: 0b0a3b8c74faa3d7f99ddc331c5542f4303760e3175c807e0f01a620f5b2da25
Contents?: true
Size: 776 Bytes
Versions: 75
Compression:
Stored size: 776 Bytes
Contents
# frozen_string_literal: true # -*- ruby encoding: utf-8 -*- 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
75 entries across 41 versions & 8 rubygems