Sha256: 5aaf0c2ae7f7268a54682d4f2aefebeed2758ff9af6426465b255eaa32c27384

Contents?: true

Size: 682 Bytes

Versions: 1

Compression:

Stored size: 682 Bytes

Contents

module CMSScanner
  module Finders
    # Same Type Finders container
    #
    # This class is designed to handle same type results, such as enumeration of plugins,
    # themes etc.
    class SameTypeFinders < IndependentFinders
      # @param [ Hash ] opts
      # @option opts [ Symbol ] :mode :mixed, :passive or :aggressive
      #
      # @return [ Findings ]
      def run(opts = {})
        symbols_from_mode(opts[:mode]).each do |symbol|
          each do |finder|
            [*finder.send(symbol, opts.merge(found: findings))].compact.each do |found|
              findings << found
            end
          end
        end

        findings
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cms_scanner-0.0.16 lib/cms_scanner/finders/same_type_finders.rb