Sha256: 8b10243f8cf2a273a368b1309563389a324a289cc0b73fb719c467fce829f4ee
Contents?: true
Size: 410 Bytes
Versions: 5
Compression:
Stored size: 410 Bytes
Contents
# frozen_string_literal: true module RangeScan class Matcher attr_reader :regexp def initialize(regexp) @regexp = Regexp.new(regexp) end def filter(results) results.select do |result| body = result.dig(:body) || "" begin body =~ regexp rescue ArgumentError, Encoding::CompatibilityError false end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems