Sha256: 5ab91d2aaabe332468f431df53f9163564ac348fef345ce2ad9e2327e28af5b8

Contents?: true

Size: 433 Bytes

Versions: 12

Compression:

Stored size: 433 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
    def initialize
      @logger = Mongoid::Logger.new
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
mongoid-2.0.0.beta.20 lib/mongoid/deprecation.rb
mongoid-2.0.0.beta.19 lib/mongoid/deprecation.rb
mongoid-2.0.0.beta.18 lib/mongoid/deprecation.rb
mongoid-2.0.0.beta.17 lib/mongoid/deprecation.rb
mongoid-2.0.0.beta.16 lib/mongoid/deprecation.rb
mongoid-2.0.0.beta.15 lib/mongoid/deprecation.rb
mongoid-2.0.0.beta.14 lib/mongoid/deprecation.rb
mongoid-2.0.0.beta.13 lib/mongoid/deprecation.rb
mongoid-2.0.0.beta.11 lib/mongoid/deprecation.rb
mongoid-2.0.0.beta.10 lib/mongoid/deprecation.rb
mongoid-2.0.0.beta.12 lib/mongoid/deprecation.rb
mongoid-locomotive-2.0.0.beta9 lib/mongoid/deprecation.rb