File: deprecate.rb [rubygems: Ruby Standard Library Documentation]

Last Modified
  2019-05-06 17:05:02 -0500
Requires

## Description

Provides a single method `deprecate` to be used to declare when something is going away.

    class Legacy
      def self.klass_method
        # ...
      end

      def instance_method
        # ...
      end

      extend Gem::Deprecate
      deprecate :instance_method, "X.z", 2011, 4

      class << self
        extend Gem::Deprecate
        deprecate :klass_method, :none, 2011, 4
      end
    end