class Solargraph::RbsMap::StdlibMap

Ruby stdlib pins

Public Class Methods

load(library) click to toggle source

@param library [String] @return [StdlibMap]

# File lib/solargraph/rbs_map/stdlib_map.rb, line 26
def self.load library
  @stdlib_maps_hash[library] ||= StdlibMap.new(library)
end
new(library) click to toggle source

@param library [String]

Calls superclass method Solargraph::RbsMap.new
# File lib/solargraph/rbs_map/stdlib_map.rb, line 14
def initialize library
  cache = Cache.load('stdlib', "#{library}.ser")
  if cache
    pins.replace cache
  else
    super
    Cache.save('stdlib', "#{library}.ser", pins)
  end
end

Public Instance Methods

repository() click to toggle source
# File lib/solargraph/rbs_map/stdlib_map.rb, line 30
def repository
  @repository ||= RBS::Repository.new
end