Sha256: 16834fde5e9057140a7c00a3b7dd0c4289a2a1aa9f7a4a166a2b5ac6d8dfd2db

Contents?: true

Size: 456 Bytes

Versions: 27

Compression:

Stored size: 456 Bytes

Contents

# Abstract class to describe different matching strategies
# Must respond to:
#   - match
#   - confidence
#
# Can assume file will be a Licensee::LicenseFile instance
class Licensee
  class Matcher
    attr_reader :file

    def self.match(file)
      self.new(file).match
    end

    def initialize(file)
      @file = file
    end

    def match
      nil
    end

    def confidence
      0
    end
    alias_method :similarity, :confidence
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
licensee-4.9.0 lib/licensee/matcher.rb
licensee-4.8.0 lib/licensee/matcher.rb
licensee-4.7.4 lib/licensee/matcher.rb
licensee-4.7.3 lib/licensee/matcher.rb
licensee-4.7.2 lib/licensee/matcher.rb
licensee-4.7.1 lib/licensee/matcher.rb
licensee-4.7.0 lib/licensee/matcher.rb
licensee-4.6.0 lib/licensee/matcher.rb
licensee-4.5.0 lib/licensee/matcher.rb
licensee-4.4.2 lib/licensee/matcher.rb
licensee-4.4.1 lib/licensee/matcher.rb
licensee-4.4.0 lib/licensee/matcher.rb
licensee-4.3.3 lib/licensee/matcher.rb
licensee-4.3.2 lib/licensee/matcher.rb
licensee-4.3.1 lib/licensee/matcher.rb
licensee-4.3.0 lib/licensee/matcher.rb
licensee-4.2.4 lib/licensee/matcher.rb
licensee-4.2.3 lib/licensee/matcher.rb
licensee-4.2.2 lib/licensee/matcher.rb
licensee-4.2.1 lib/licensee/matcher.rb