Sha256: bf2558863ca000a741af5cd5da1dd70c8894cc9eda57cd272bb01f61466326f0

Contents?: true

Size: 894 Bytes

Versions: 73

Compression:

Stored size: 894 Bytes

Contents

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

73 entries across 70 versions & 9 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/core_ext/module/deprecation.rb
activesupport-5.1.7 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.1.7.rc1 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.1.6.2 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.0.7.2 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.1.6.1 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.0.7.1 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.1.6 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.0.7 lib/active_support/core_ext/module/deprecation.rb
tdiary-5.0.8 vendor/bundle/gems/activesupport-5.1.5/lib/active_support/core_ext/module/deprecation.rb
activesupport-5.1.5 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.1.5.rc1 lib/active_support/core_ext/module/deprecation.rb
pract6-0.1.0 .gem/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/core_ext/module/deprecation.rb
activesupport-5.1.4 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.0.6 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.1.4.rc1 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.0.6.rc1 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.1.3 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.1.3.rc3 lib/active_support/core_ext/module/deprecation.rb
activesupport-5.0.5 lib/active_support/core_ext/module/deprecation.rb