Class: ExceptionHandling::ExceptionCatalog
- Inherits:
-
Object
- Object
- ExceptionHandling::ExceptionCatalog
- Defined in:
- lib/exception_handling/exception_catalog.rb
Instance Method Summary collapse
- #find(exception_data) ⇒ Object
-
#initialize(filter_path) ⇒ ExceptionCatalog
constructor
A new instance of ExceptionCatalog.
Constructor Details
#initialize(filter_path) ⇒ ExceptionCatalog
Returns a new instance of ExceptionCatalog.
4 5 6 7 8 |
# File 'lib/exception_handling/exception_catalog.rb', line 4 def initialize(filter_path) @filter_path = filter_path @filters = { } @filters_last_modified_time = nil end |
Instance Method Details
#find(exception_data) ⇒ Object
10 11 12 13 |
# File 'lib/exception_handling/exception_catalog.rb', line 10 def find(exception_data) refresh_filters @filters.values.find { |filter| filter.match?(exception_data) } end |