Sha256: e992c3c36bef5aa7871a937fc77dbd222f712b8bd87654405ca128af4b3e6db8
Contents?: true
Size: 372 Bytes
Versions: 5
Compression:
Stored size: 372 Bytes
Contents
module AttemptThis # Type-based exception filter. class ExceptionTypeFilter # Initializer. def initialize(exception_classes) @exception_classes = Array.new(exception_classes) end # Tells whether the given exception satisfies the filter. def include?(exception) @exception_classes.any?{|klass| exception.is_a?(klass)} end end end
Version data entries
5 entries across 5 versions & 1 rubygems