Sha256: 2c88117ed25949c079725c1631cf4d71433af406d4997c81ce1f49dbbd23103c

Contents?: true

Size: 546 Bytes

Versions: 15

Compression:

Stored size: 546 Bytes

Contents

# frozen_string_literal: true

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

15 entries across 15 versions & 1 rubygems

Version Path
licensee-9.18.0 lib/licensee/matchers/package.rb
licensee-9.17.1 lib/licensee/matchers/package.rb
licensee-9.17.0 lib/licensee/matchers/package.rb
licensee-9.16.1 lib/licensee/matchers/package.rb
licensee-9.16.0 lib/licensee/matchers/package.rb
licensee-9.15.3 lib/licensee/matchers/package.rb
licensee-9.15.2 lib/licensee/matchers/package.rb
licensee-9.15.1 lib/licensee/matchers/package.rb
licensee-9.15.0 lib/licensee/matchers/package.rb
licensee-9.14.1 lib/licensee/matchers/package.rb
licensee-9.14.0 lib/licensee/matchers/package.rb
licensee-9.13.2 lib/licensee/matchers/package.rb
licensee-9.13.1 lib/licensee/matchers/package.rb
licensee-9.13.0 lib/licensee/matchers/package.rb
licensee-9.12.0 lib/licensee/matchers/package.rb