According to the Ruby on Rails API docs, you can opt out of methods using the # deprecate method. Everything is good.
My question is: can static methods be discounted - if so, how?
For regular methods, you can simply do something like this:
deprecate :my_method def my_method
This bot gives me a headache (and it doesnโt work):
deprecate :"self.my_method" def self.my_method
Ps: I know that I can trigger a warning from a method as follows:
def self.my_method ActiveSupport::Deprecation.warn "the warning..."
source share