Sha256: 7cbcb4017634200bf00ddcdff6ee2f81727d1adba346aaf798c89b88871d1c0f

Contents?: true

Size: 507 Bytes

Versions: 8

Compression:

Stored size: 507 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 self.package_manager?
      false
    end

    def initialize(file)
      @file = file
    end

    def match
      nil
    end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
licensee-5.0.0 lib/licensee/matcher.rb
licensee-5.0.0b7 lib/licensee/matcher.rb
licensee-5.0.0b6 lib/licensee/matcher.rb
licensee-5.0.0b5 lib/licensee/matcher.rb
licensee-5.0.0b4 lib/licensee/matcher.rb
licensee-5.0.0b3 lib/licensee/matcher.rb
licensee-5.0.0b2 lib/licensee/matcher.rb
licensee-5.0.0b1 lib/licensee/matcher.rb