Sha256: 11ced644595d0de7491589db54d40de64a29103036fd8b3edbd196a5c66bea7c

Contents?: true

Size: 690 Bytes

Versions: 4

Compression:

Stored size: 690 Bytes

Contents

module Yoda
  module Store
    module Actions
      class ImportStdLibrary
        # @return [Project::Dependency::Std]
        attr_reader :dep

        class << self
          # @param dep [Project::Dependency::Std]
          # @return [Objects::Patch]
          def run(dep)
            new(dep).run
          end
        end

        # @param dep [Project::Dependency::Std]
        def initialize(dep)
          @dep = dep
        end

        # @return [Objects::Patch]
        def run
          BuildCoreIndex.run unless BuildCoreIndex.exists?
          return false unless File.exist?(dep.doc_path)
          YardImporter.import(dep.doc_path)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yoda-language-server-0.10.1 lib/yoda/store/actions/import_std_library.rb
yoda-language-server-0.10.0 lib/yoda/store/actions/import_std_library.rb
yoda-language-server-0.9.0 lib/yoda/store/actions/import_std_library.rb
yoda-language-server-0.8.0 lib/yoda/store/actions/import_std_library.rb