class ActiveSupport::Deprecation

Parent:
Object
Included modules:
ActiveSupport::Deprecation::Behavior, ActiveSupport::Deprecation::Reporting, ActiveSupport::Deprecation::MethodWrapper

Deprecation specifies the API used by Rails to deprecate methods, instance variables, objects and constants.

Constants

DEFAULT_BEHAVIORS

Default warning behaviors per Rails.env.

Attributes

deprecation_horizon[RW]

The version number in which the deprecated behavior will be removed, by default.

Public Class Methods

new(deprecation_horizon = '5.1', gem_name = 'Rails') Show source
# File activesupport/lib/active_support/deprecation.rb, line 35
def initialize(deprecation_horizon = '5.1', gem_name = 'Rails')
  self.gem_name = gem_name
  self.deprecation_horizon = deprecation_horizon
  # By default, warnings are not silenced and debugging is off.
  self.silenced = false
  self.debug = false
end

It accepts two parameters on initialization. The first is a version of library and the second is a library name

ActiveSupport::Deprecation.new('2.0', 'MyLibrary')

© 2004–2018 David Heinemeier Hansson
Licensed under the MIT License.