A managed collection of deprecators. Configuration methods, such as behavior=
, affect all deprecators in the collection. Additionally, the silence
method silences all deprecators in the collection for the duration of a given block.
- #
- B
- D
- E
- N
- S
Class Public methods
new() Link
Instance Public methods
[]=(name, deprecator) Link
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
behavior=(behavior) Link
Sets the deprecation warning behavior for all deprecators in this collection.
debug=(debug) Link
Sets the debug flag for all deprecators in this collection.
disallowed_behavior=(disallowed_behavior) Link
Sets the disallowed deprecation warning behavior for all deprecators in this collection.
disallowed_warnings=(disallowed_warnings) Link
Sets the disallowed deprecation warnings for all deprecators in this collection.
each(&block) Link
Iterates over all deprecators in this collection. If no block is given, returns an Enumerator
.
silence(&block) Link
Silences all deprecators in this collection for the duration of the given block.