Sha256: 7d7d276e6178be466fc255ebd85e8c529c4e4dec9c4781fff28121bac54c9c10
Contents?: true
Size: 280 Bytes
Versions: 6
Compression:
Stored size: 280 Bytes
Contents
# CREDIT David Heinemeier Hansson module Kernel # Supress errors while executing a block, # with execptions. def suppress(*exception_classes) begin yield rescue Exception => e raise unless exception_classes.any? { |cls| e.kind_of?(cls) } end end end
Version data entries
6 entries across 6 versions & 1 rubygems