Sha256: dc0239d10da9d9efd147d683db8b5034813ca737e6f777dbc4737f2cbc3ba165

Contents?: true

Size: 329 Bytes

Versions: 1

Compression:

Stored size: 329 Bytes

Contents

require 'optional_logger'

module OptionalLogger
  module LoggerManagement
    def self.included(base)
      base.extend(ClassMethods)
    end

    module ClassMethods
      def logger(logger = nil)
        return @logger if @logger && logger.nil?
        @logger = OptionalLogger::Logger.new(logger)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
optional_logger-1.1.0 lib/optional_logger/logger_management.rb