Sha256: 239279cd94c79e9608e271c96619fd79999523d60c40d611e7af0bacfb7cd807
Contents?: true
Size: 539 Bytes
Versions: 20
Compression:
Stored size: 539 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: class Deprecation #:nodoc include Singleton # Alert of a deprecation. This will delegate to the logger and call warn on # it. # # Example: # # <tt>deprecation.alert("Method no longer used")</tt> def alert(message) @logger.warn("Deprecation: #{message}") end protected # Instantiate a new logger to stdout or a rails logger if available. def initialize @logger = defined?(Rails) ? Rails.logger : Logger.new($stdout) end end end
Version data entries
20 entries across 20 versions & 6 rubygems