Class: Solargraph::RbsMap::CoreMap
- Inherits:
-
Object
- Object
- Solargraph::RbsMap::CoreMap
- Includes:
- Conversions
- Defined in:
- lib/solargraph/rbs_map/core_map.rb
Overview
Ruby core pins
Constant Summary collapse
- FILLS_DIRECTORY =
File.join(File.dirname(__FILE__), '..', '..', '..', 'rbs', 'fills')
Constants included from Logging
Logging::DEFAULT_LOG_LEVEL, Logging::LOG_LEVELS
Instance Method Summary collapse
-
#initialize ⇒ CoreMap
constructor
A new instance of CoreMap.
Methods included from Conversions
Methods included from Logging
Constructor Details
#initialize ⇒ CoreMap
Returns a new instance of CoreMap.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/solargraph/rbs_map/core_map.rb', line 12 def initialize cache = Cache.load('core.ser') if cache pins.replace cache else loader = RBS::EnvironmentLoader.new(repository: RBS::Repository.new(no_stdlib: false)) loader.add(path: Pathname(FILLS_DIRECTORY)) load_environment_to_pins(loader) pins.concat RbsMap::CoreFills::ALL processed = ApiMap::Store.new(pins).pins.reject { |p| p.is_a?(Solargraph::Pin::Reference::Override) } pins.replace processed Cache.save('core.ser', pins) end end |