instance method silence

Ruby on Rails 8.0.4

Since v7.1.6

Available in: v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

silence(&block)

Silences all deprecators in this collection for the duration of the given block.

See ActiveSupport::Deprecation#silence.

Parameters

block block
Source
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 84
      def silence(&block)
        each { |deprecator| deprecator.begin_silence }
        block.call
      ensure
        each { |deprecator| deprecator.end_silence }
      end

Defined in activesupport/lib/active_support/deprecation/deprecators.rb line 84 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Deprecation::Deprecators

Type at least 2 characters to search.

↑↓ navigate · open · esc close