Sha256: 26fb02ecda8e0f07aa21c60aba38077c113f695d130c9bc44e0173c51a4362c2

Contents?: true

Size: 639 Bytes

Versions: 11

Compression:

Stored size: 639 Bytes

Contents

# frozen_string_literal: true

require_relative './sources/base'
require_relative './sources/git'
require_relative './sources/stdlib'
require_relative './sources/rubygems'

module RBS
  module Collection
    module Sources
      def self.from_config_entry(source_entry)
        case source_entry['type']
        when 'git', nil # git source by default
          __skip__ = Git.new(**source_entry.slice('name', 'revision', 'remote', 'repo_dir').transform_keys(&:to_sym))
        when 'stdlib'
          Stdlib.instance
        when 'rubygems'
          Rubygems.instance
        else
          raise
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
getargv-0.3.3-universal-darwin vendor/bundle/ruby/3.3.0/gems/rbs-2.8.4/lib/rbs/collection/sources.rb
rbs-2.8.4 lib/rbs/collection/sources.rb
rbs-2.8.3 lib/rbs/collection/sources.rb
rbs-2.8.2 lib/rbs/collection/sources.rb
rbs-2.8.1 lib/rbs/collection/sources.rb
rbs-2.8.0 lib/rbs/collection/sources.rb
rbs-2.8.0.pre.1 lib/rbs/collection/sources.rb
rbs-2.7.0 lib/rbs/collection/sources.rb
rbs-2.7.0.pre.3 lib/rbs/collection/sources.rb
rbs-2.7.0.pre.2 lib/rbs/collection/sources.rb
rbs-2.7.0.pre.1 lib/rbs/collection/sources.rb