Sha256: 3a2995ef86194fcb9ab7e44cd6b2adaa2ba0cb5e90eaf7ccda5d5c94d6611c83
Contents?: true
Size: 1.96 KB
Versions: 2
Compression:
Stored size: 1.96 KB
Contents
require 'yoda/store/objects/library/path_resolvable' module Yoda module Store module Objects module Library class Std include Serializable # @return [String] attr_reader :version # @return [Core] def self.current_version new end # @param version [String] def initialize(version: RUBY_VERSION) @version = version end def to_h { version: version } end def id name end def name 'std' end def doc_path VersionStore.for_current_version.stdlib_yardoc_path end # @return [Connected] def with_project_connection(**kwargs) self.class.const_get(:Connected).new(self, **kwargs) end class Connected extend ConnectedDelegation include WithRegistry include PathResolvable delegate_to_object :version delegate_to_object :id, :name, :doc_path, :to_h, :with_project_connection delegate_to_object :hash, :eql?, :==, :to_json, :derive attr_reader :object, :project # @param object [Core] # @param project [Project] def initialize(object, project:) @object = object @project = project end def create_patch Actions::ImportStdLibrary.run(self) end # @note Implementation for {WithRegistry#registry_path} def registry_path VersionStore.for_current_version.registry_path_for_stdlib end # @return [Array<String>] def require_paths # TODO: Calculate from registry [File.join(VersionStore.for_current_version.ruby_source_path, "lib/")] end end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yoda-language-server-0.10.1 | lib/yoda/store/objects/library/std.rb |
yoda-language-server-0.10.0 | lib/yoda/store/objects/library/std.rb |