Sha256: 144dcba029bf00d91aa9dbac830d37aca8d15598fccf98eb2cdf6d43cc8b8da9

Contents?: true

Size: 477 Bytes

Versions: 1

Compression:

Stored size: 477 Bytes

Contents

# frozen_string_literal: true

module PlatformosCheck
  module LanguageServer
    class DocumentLinkEngine
      def initialize(storage)
        @storage = storage
        @providers = DocumentLinkProvider.all.map { |x| x.new(storage) }
      end

      def document_links(relative_path)
        buffer = @storage.read(relative_path)
        return [] unless buffer

        @providers.flat_map do |p|
          p.document_links(buffer)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
platformos-check-0.0.1 lib/platformos_check/language_server/document_link_engine.rb