Sha256: 195708434304ba9581372eebeeacf604f268916a4b049b4efe2068e43fb4a0ae

Contents?: true

Size: 514 Bytes

Versions: 20

Compression:

Stored size: 514 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

20 entries across 20 versions & 1 rubygems

Version Path
licensee-9.10.0 lib/licensee/matchers/package.rb
licensee-9.9.4 lib/licensee/matchers/package.rb
licensee-9.9.3 lib/licensee/matchers/package.rb
licensee-9.9.2 lib/licensee/matchers/package.rb
licensee-9.9.1 lib/licensee/matchers/package.rb
licensee-9.9.0 lib/licensee/matchers/package.rb
licensee-9.9.0.beta.3 lib/licensee/matchers/package.rb
licensee-9.9.0.beta.2 lib/licensee/matchers/package.rb
licensee-9.8.0 lib/licensee/matchers/package.rb
licensee-9.7.0 lib/licensee/matchers/package.rb
licensee-9.6.0 lib/licensee/matchers/package.rb
licensee-9.5.0 lib/licensee/matchers/package.rb
licensee-9.4.0 lib/licensee/matchers/package.rb
licensee-9.3.1 lib/licensee/matchers/package.rb
licensee-9.3.0 lib/licensee/matchers/package.rb
licensee-9.2.1 lib/licensee/matchers/package.rb
licensee-9.2.0 lib/licensee/matchers/package.rb
licensee-9.1.0 lib/licensee/matchers/package.rb
licensee-9.0.0 lib/licensee/matchers/package.rb
licensee-9.0.0.beta.1 lib/licensee/matchers/package.rb