class RBS::Collection::Sources::Stdlib
signatures that are bundled in rbs gem under the stdlib/ directory
signatures that are bundled in rbs gem under the stdlib/ directory
Constants
- REPO
Public Class Methods
() → instance
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/sig/collection/sources.rbs, line 170
def self.instance: () -> instance
polyfill of singleton module
Public Instance Methods
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/collection/sources/stdlib.rb, line 15 def has?(name, version) lookup(name, version) end
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/collection/sources/stdlib.rb, line 23 def install(dest:, name:, version:, stdout:) # Do nothing because stdlib RBS is available by default from = lookup(name, version) stdout.puts "Using #{name}:#{version} (#{from})" end
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/collection/sources/stdlib.rb, line 29 def manifest_of(name, version) unless path = lookup(name, version) RBS.logger.warn "`#{name}` is specified in rbs_collection.lock.yaml. But it is not found in #{REPO.dirs.join(",")}" return end manifest_path = path.join('manifest.yaml') YAML.safe_load(manifest_path.read) if manifest_path.exist? end
() → source_entry
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/collection/sources/stdlib.rb, line 38 def to_lockfile { 'type' => 'stdlib', } end