class Module

def deprecate(*method_names)

end
end
Kernel.warn message
message = "#{deprecated_method_name} is deprecated and will be removed from MyLibrary | #{message}"
def deprecation_warning(deprecated_method_name, message, caller_backtrace = nil)
class MyLib::Deprecator

method where you can implement your custom warning behavior.
\Custom deprecators must respond to deprecation_warning(deprecated_method_name, message, caller_backtrace)

deprecate :foo, bar: "warning!", deprecator: MyLib::Deprecator.new
deprecate :foo, deprecator: MyLib::Deprecator.new

You can also use custom deprecator instance:

deprecate :foo, :bar, baz: 'warning!', qux: 'gone!'
deprecate bar: 'message'
deprecate :foo
def deprecate(*method_names)
  ActiveSupport::Deprecation.deprecate_methods(self, *method_names)
end