Sha256: e40340b54adb7d16f48a4b753c523a8c78cbacfc3529b025896c213b8d2d8a89

Contents?: true

Size: 950 Bytes

Versions: 29

Compression:

Stored size: 950 Bytes

Contents

require 'active_support/deprecation/method_wrappers'

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

29 entries across 29 versions & 2 rubygems

Version Path
activesupport-4.0.13 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.13.rc1 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.11.1 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.12 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.11 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.10 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.10.rc2 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.10.rc1 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.9 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.8 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.7 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.6 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.6.rc3 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.6.rc2 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.6.rc1 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.5 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.4 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.4.rc1 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.3 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.0.2 lib/active_support/core_ext/module/deprecation.rb