Method: ActiveSupport::BacktraceCleaner#add_silencer
- Defined in:
- activesupport/lib/active_support/backtrace_cleaner.rb
#add_silencer(&block) ⇒ Object
Adds a silencer from the block provided. If the silencer returns true for a given line, it will be excluded from the clean backtrace.
# Will reject all lines that include the word "puma", like "/gems/puma/server.rb" or "/app/my_puma_server/rb"
backtrace_cleaner.add_silencer { |line| /puma/.match?(line) }
92 93 94 |
# File 'activesupport/lib/active_support/backtrace_cleaner.rb', line 92 def add_silencer(&block) @silencers << block end |