Sha256: 0666acc5761a3ca1fa56073cb7b8b7c750c210f466a5ee1a2242d6c04ab0e5e3

Contents?: true

Size: 515 Bytes

Versions: 2

Compression:

Stored size: 515 Bytes

Contents

module Licensee
  module Matchers
    class Package < Licensee::Matchers::Matcher
      def match
        return @match if defined? @match
        return if license_property.nil? || license_property.to_s.empty?

        @match = Licensee.licenses(hidden: true).find do |license|
          license.key == license_property
        end
        @match ||= License.find('other')
      end

      def confidence
        90
      end

      def license_property
        raise 'Not implemented'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
licensee-9.11.0 lib/licensee/matchers/package.rb
licensee-9.10.1 lib/licensee/matchers/package.rb