Class: ExceptionHandling::ExceptionCatalog

Inherits:
Object
  • Object
show all
Defined in:
lib/exception_handling/exception_catalog.rb

Instance Method Summary collapse

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