Sha256: 6d8c4e9263dfcffc04e55cc5e49abc8f74e5dfd6bf515ffaf204eac205f4c5ae

Contents?: true

Size: 315 Bytes

Versions: 17

Compression:

Stored size: 315 Bytes

Contents

module Backports
  class << self
    attr_accessor :warned # private
    Backports.warned = {}

    def frown_upon kind, msg
      warn kind, msg if $VERBOSE
    end

    def warn kind, msg
      return if warned[kind]
      super msg
      warned[kind] = msg
    end

    alias_method :deprecate, :warn

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
backports-3.25.0 lib/backports/tools/deprecation.rb
backports-3.24.1 lib/backports/tools/deprecation.rb
backports-3.24.0 lib/backports/tools/deprecation.rb
backports-3.23.0 lib/backports/tools/deprecation.rb
backports-3.22.1 lib/backports/tools/deprecation.rb
backports-3.22.0 lib/backports/tools/deprecation.rb
backports-3.21.0 lib/backports/tools/deprecation.rb
backports-3.20.2 lib/backports/tools/deprecation.rb
backports-3.20.1 lib/backports/tools/deprecation.rb
backports-3.20.0 lib/backports/tools/deprecation.rb
backports-3.19.0 lib/backports/tools/deprecation.rb
backports-3.18.2 lib/backports/tools/deprecation.rb
backports-3.18.1 lib/backports/tools/deprecation.rb
backports-3.18.0 lib/backports/tools/deprecation.rb
backports-3.17.2 lib/backports/tools/deprecation.rb
backports-3.17.1 lib/backports/tools/deprecation.rb
backports-3.17.0 lib/backports/tools/deprecation.rb