Sha256: 29325eec626e3e3ec915af9ce1bb44896188b5f98389bf882ca7e867d558b12b

Contents?: true

Size: 819 Bytes

Versions: 54

Compression:

Stored size: 819 Bytes

Contents

module CMSScanner
  module Finders
    class Finder
      module SmartURLChecker
        # Findings
        class Findings < Array
          def <<(finding)
            return self unless finding

            each do |f|
              next unless f == finding && f.found_by == finding.found_by

              # This makes sure entries added are unique
              # and prevent pages redirecting to the same one to be added twice
              entries_to_add = finding.interesting_entries - f.interesting_entries
              return self if entries_to_add.empty?

              entries_to_add.each { |entry| f.interesting_entries << entry }

              f.confidence += finding.confidence

              return self
            end

            super(finding)
          end
        end
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
cms_scanner-0.0.41.10 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.41.9 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.41.8 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.41.7 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.41.6 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.41.5 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.41.4 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.41.3 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.41.2 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.41.1 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.41.0 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.40.3 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.40.2 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.40.1 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.40 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.39.4 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.39.3 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.39.2 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.39.1 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb
cms_scanner-0.0.39.0 lib/cms_scanner/finders/finder/smart_url_checker/findings.rb