Object
The +Yell::Silencer+ is your handly helper for stiping out unwanted log messages.
Add one or more patterns to the silencer
@example
add( 'password' ) add( 'username', 'password' )
@example Add regular expressions
add( /password/ )
@return [self] The silencer instance
# File lib/yell/silencer.rb, line 29 def add( *patterns ) patterns.each { |pattern| add!(pattern) } self end
Clears out all the messages that would match any defined pattern
@example
call(['username', 'password']) #=> ['username]
@return [Array] The remaining messages
# File lib/yell/silencer.rb, line 42 def call( *messages ) return messages if @patterns.empty? messages.reject { |m| matches?(m) } end
Generated with the Darkfish Rdoc Generator 2.