method

collect_deprecations

collect_deprecations(deprecator = nil)
public

Returns the return value of the block and an array of all the deprecation warnings emitted by the given deprecator during the execution of the yielded block.

collect_deprecations(CustomDeprecator) do
  CustomDeprecator.warn "message"
  ActiveSupport::Deprecation.new.warn "other message"
  :result
end # => [:result, ["message"]]