Sha256: bd34e2d7ebb83e454869510e19f734da2a4d22db3ab584280789da1b228656ff

Contents?: true

Size: 422 Bytes

Versions: 2

Compression:

Stored size: 422 Bytes

Contents

# frozen_string_literal: true

require 'spandx/parsers/base'
require 'spandx/parsers/gemfile_lock'
require 'spandx/parsers/pipfile_lock'

module Spandx
  module Parsers
    class << self
      def for(path, catalogue: Spandx::Catalogue.latest)
        result = ::Spandx::Parsers::Base.find do |x|
          x.matches?(File.basename(path))
        end

        result&.new(catalogue: catalogue)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spandx-0.1.3 lib/spandx/parsers.rb
spandx-0.1.2 lib/spandx/parsers.rb