Module: RBS::Collection::Sources
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Classes:
| |
Defined in: | lib/rbs/collection/sources.rb, lib/rbs/collection/sources/base.rb, lib/rbs/collection/sources/git.rb, lib/rbs/collection/sources/local.rb, lib/rbs/collection/sources/rubygems.rb, lib/rbs/collection/sources/stdlib.rb |
Class Method Summary
Class Method Details
.from_config_entry(source_entry, base_directory:)
[ GitHub ]# File 'lib/rbs/collection/sources.rb', line 12
def self.from_config_entry(source_entry, base_directory:) case source_entry['type'] when 'git', nil # git source by default # @type var source_entry: Git::source_entry Git.new( name: source_entry["name"], revision: source_entry["revision"], remote: source_entry["remote"], repo_dir: source_entry["repo_dir"] ) when 'local' # @type var source_entry: Local::source_entry Local.new( path: source_entry['path'], base_directory: base_directory, ) when 'stdlib' Stdlib.instance when 'rubygems' Rubygems.instance else raise end end