Sha256: 9a88f1e6ca4c32f5feb529ed5daedb564f65187e299e3b202a61b4d6e458c5c7
Contents?: true
Size: 644 Bytes
Versions: 8
Compression:
Stored size: 644 Bytes
Contents
module Docile # @api private # # This is used to remove entries pointing to Docile's source files # from {Exception#backtrace} and {Exception#backtrace_locations}. # # If {NoMethodError} is caught then the exception object will be extended # by this module to add filter functionalities. module BacktraceFilter FILTER_PATTERN = /lib\/docile/ def backtrace super.select { |trace| trace !~ FILTER_PATTERN } end if ::Exception.public_method_defined?(:backtrace_locations) def backtrace_locations super.select { |location| location.absolute_path !~ FILTER_PATTERN } end end end end
Version data entries
8 entries across 5 versions & 2 rubygems