Sha256: fd4d4ba2c9dbbb11602d00af8a4bf0d1251ab31c8b5755591387a0c02eb9f3f4
Contents?: true
Size: 651 Bytes
Versions: 12
Compression:
Stored size: 651 Bytes
Contents
# frozen_string_literal: true module Spandx module Core class Parser UNKNOWN = Class.new do def self.parse(*_args) [] end end def match?(_path) raise ::Spandx::Error, :match? end def parse(_dependency) raise ::Spandx::Error, :parse end class << self include Registerable def parse(path) self.for(path).parse(path) end def for(path) path = Pathname.new(path) return UNKNOWN if !path.exist? || path.zero? find { |x| x.match?(path) } || UNKNOWN end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems