Sha256: 7f46362387d64c6c9a3fb8f51ad9cea5324e333e394f9271ecbdb85501d88798

Contents?: true

Size: 896 Bytes

Versions: 104

Compression:

Stored size: 896 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

104 entries across 99 versions & 12 rubygems

Version Path
activesupport-4.2.11.3 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.11.2 lib/active_support/core_ext/module/deprecation.rb
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/activesupport-4.2.11.1/lib/active_support/core_ext/module/deprecation.rb
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/activesupport-4.2.11.1/lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.11.1 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.11 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.10 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.10.rc1 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.9 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.9.rc2 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.9.rc1 lib/active_support/core_ext/module/deprecation.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/activesupport-4.2.8/lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.8 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.8.rc1 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.7.1 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.7 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.1.16 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.1.16.rc1 lib/active_support/core_ext/module/deprecation.rb
activesupport-4.2.7.rc1 lib/active_support/core_ext/module/deprecation.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/core_ext/module/deprecation.rb