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.



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