instance method
[]=
Ruby on Rails 8.0.4
Since v7.1.6Signature
[]=(name, deprecator)
Adds a given deprecator to this collection. The deprecator will be immediately configured with any options previously set on this collection.
deprecators = ActiveSupport::Deprecation::Deprecators.new deprecators.debug = true foo_deprecator = ActiveSupport::Deprecation.new("2.0", "Foo") foo_deprecator.debug # => false deprecators[:foo] = foo_deprecator deprecators[:foo].debug # => true foo_deprecator.debug # => true
Parameters
-
namereq -
deprecatorreq
Source
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 34
def []=(name, deprecator)
apply_options(deprecator)
@deprecators[name] = deprecator
end
Defined in activesupport/lib/active_support/deprecation/deprecators.rb line 34
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Deprecation::Deprecators