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.
6 7 8 9 10 |
# File 'lib/exception_handling/exception_catalog.rb', line 6 def initialize(filter_path) @filter_path = filter_path @filters = {} @filters_last_modified_time = nil end |
Instance Method Details
#find(exception_data) ⇒ Object
12 13 14 15 |
# File 'lib/exception_handling/exception_catalog.rb', line 12 def find(exception_data) refresh_filters @filters.values.find { |filter| filter.match?(exception_data) } end |