Skip to content
On this page

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

module · Ruby 3.0

Gem::Deprecate

4 instance methods 3 class methods

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

Example
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

Class methods 3

Instance methods 4