class RBS::Collection::Sources::Rubygems
Signatures that are inclduded in gem package as sig/ directory.
Public Instance Methods
has?(config_entry)
click to toggle source
# File lib/rbs/collection/sources/rubygems.rb, line 10 def has?(config_entry) gem_sig_path(config_entry) end
install(dest:, config_entry:, stdout:)
click to toggle source
# File lib/rbs/collection/sources/rubygems.rb, line 20 def install(dest:, config_entry:, stdout:) # Do nothing because stdlib RBS is available by default name = config_entry['name'] version = config_entry['version'] or raise _, from = gem_sig_path(config_entry) stdout.puts "Using #{name}:#{version} (#{from})" end
to_lockfile()
click to toggle source
# File lib/rbs/collection/sources/rubygems.rb, line 28 def to_lockfile { 'type' => 'rubygems', } end
versions(config_entry)
click to toggle source
# File lib/rbs/collection/sources/rubygems.rb, line 14 def versions(config_entry) spec, _ = gem_sig_path(config_entry) spec or raise [spec.version.to_s] end
Private Instance Methods
gem_sig_path(config_entry)
click to toggle source
# File lib/rbs/collection/sources/rubygems.rb, line 34 def gem_sig_path(config_entry) RBS::EnvironmentLoader.gem_sig_path(config_entry['name'], config_entry['version']) end