Sha256: 8b8d5f6e21ad0385dbbee2cd20bc598007dd0184bcd76b274c646de4397b7734

Contents?: true

Size: 925 Bytes

Versions: 190

Compression:

Stored size: 925 Bytes

Contents

# frozen_string_literal: true

class Module
  #   deprecate :foo
  #   deprecate bar: 'message'
  #   deprecate :foo, :bar, baz: 'warning!', qux: 'gone!'
  #
  # You can also use custom deprecator instance:
  #
  #   deprecate :foo, deprecator: MyLib::Deprecator.new
  #   deprecate :foo, bar: "warning!", deprecator: MyLib::Deprecator.new
  #
  # \Custom deprecators must respond to <tt>deprecation_warning(deprecated_method_name, message, caller_backtrace)</tt>
  # method where you can implement your custom warning behavior.
  #
  #   class MyLib::Deprecator
  #     def deprecation_warning(deprecated_method_name, message, caller_backtrace = nil)
  #       message = "#{deprecated_method_name} is deprecated and will be removed from MyLibrary | #{message}"
  #       Kernel.warn message
  #     end
  #   end
  def deprecate(*method_names)
    ActiveSupport::Deprecation.deprecate_methods(self, *method_names)
  end
end

Version data entries

190 entries across 176 versions & 24 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.8.7/lib/active_support/core_ext/module/deprecation.rb
activesupport-7.0.8.7 lib/active_support/core_ext/module/deprecation.rb
activesupport-7.0.8.6 lib/active_support/core_ext/module/deprecation.rb
activesupport-6.1.7.10 lib/active_support/core_ext/module/deprecation.rb
activesupport-6.1.7.9 lib/active_support/core_ext/module/deprecation.rb
activesupport-7.0.8.5 lib/active_support/core_ext/module/deprecation.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8.4/lib/active_support/core_ext/module/deprecation.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/module/deprecation.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/module/deprecation.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/module/deprecation.rb
activesupport-7.0.8.4 lib/active_support/core_ext/module/deprecation.rb
activesupport-6.1.7.8 lib/active_support/core_ext/module/deprecation.rb
activesupport-7.0.8.1 lib/active_support/core_ext/module/deprecation.rb
activesupport-6.1.7.7 lib/active_support/core_ext/module/deprecation.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activesupport-7.0.3.1/lib/active_support/core_ext/module/deprecation.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activesupport-7.0.2.3/lib/active_support/core_ext/module/deprecation.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/core_ext/module/deprecation.rb
activesupport-7.0.8 lib/active_support/core_ext/module/deprecation.rb
activesupport-7.0.7.2 lib/active_support/core_ext/module/deprecation.rb
activesupport-6.1.7.6 lib/active_support/core_ext/module/deprecation.rb