Sha256: 29119c234af0d25e62d2282246ee815fd255a428b4ccfee717b889b2745765ff

Contents?: true

Size: 419 Bytes

Versions: 12

Compression:

Stored size: 419 Bytes

Contents

module Licensee
  module Matchers
    class Exact
      attr_reader :file

      def initialize(file)
        @file = file
      end

      def match
        return @match if defined? @match
        @match = Licensee.licenses(hidden: true).find do |license|
          license.length == @file.length && license.wordset == @file.wordset
        end
      end

      def confidence
        100
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
licensee-9.8.0 lib/licensee/matchers/exact.rb
licensee-9.7.0 lib/licensee/matchers/exact.rb
licensee-9.6.0 lib/licensee/matchers/exact.rb
licensee-9.5.0 lib/licensee/matchers/exact.rb
licensee-9.4.0 lib/licensee/matchers/exact.rb
licensee-9.3.1 lib/licensee/matchers/exact.rb
licensee-9.3.0 lib/licensee/matchers/exact.rb
licensee-9.2.1 lib/licensee/matchers/exact.rb
licensee-9.2.0 lib/licensee/matchers/exact.rb
licensee-9.1.0 lib/licensee/matchers/exact.rb
licensee-9.0.0 lib/licensee/matchers/exact.rb
licensee-9.0.0.beta.1 lib/licensee/matchers/exact.rb