Sha256: b4a3db90557af79abb98b1afa9281ea8052be5aee8bde3b9d4753aedfb5a637e

Contents?: true

Size: 478 Bytes

Versions: 2

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

require "whatweb"

module Ryo
  module Plugin
    class Tech
      def self.discover(uri)
        target = WhatWeb::Target.new(uri)
        plugins = WhatWeb::PluginManager.load_plugins
        results = {}
        plugins.each do |name, plugin|
          result = plugin.execute(target)
          results[name] = result unless result.empty?
        rescue StandardError => _
          next
        end
        results
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ryo-0.3.2 lib/ryo/plugin/tech.rb
ryo-0.3.1 lib/ryo/plugin/tech.rb