Class: ExceptionHandling::ExceptionFilters
- Inherits:
-
Object
- Object
- ExceptionHandling::ExceptionFilters
- Defined in:
- lib/exception_handling.rb
Defined Under Namespace
Classes: Filter
Instance Method Summary collapse
- #filtered?(exception_data) ⇒ Boolean
-
#initialize(filter_path) ⇒ ExceptionFilters
constructor
A new instance of ExceptionFilters.
Constructor Details
#initialize(filter_path) ⇒ ExceptionFilters
Returns a new instance of ExceptionFilters.
629 630 631 632 633 |
# File 'lib/exception_handling.rb', line 629 def initialize( filter_path ) @filter_path = filter_path @filters = { } @filters_last_modified_time = nil end |
Instance Method Details
#filtered?(exception_data) ⇒ Boolean
635 636 637 638 639 640 641 642 643 644 |
# File 'lib/exception_handling.rb', line 635 def filtered?( exception_data ) refresh_filters @filters.any? do |name, filter| if ( match = filter.match?( exception_data ) ) ExceptionHandling.logger.warn( "Filtered exception using '#{name}'; not sending email to notify" ) end match end end |