Class: Solargraph::LanguageServer::Message::Extended::DownloadCore

Inherits:
Base
  • Object
show all
Defined in:
lib/solargraph/language_server/message/extended/download_core.rb

Overview

Update core Ruby documentation.

Instance Attribute Summary

Attributes inherited from Base

#error, #host, #id, #method, #params, #request, #result

Instance Method Summary collapse

Methods inherited from Base

#initialize, #post_initialize, #send_response, #set_error, #set_result

Constructor Details

This class inherits a constructor from Solargraph::LanguageServer::Message::Base

Instance Method Details

#processObject



12
13
14
15
16
17
18
# File 'lib/solargraph/language_server/message/extended/download_core.rb', line 12

def process
  ver = Solargraph::YardMap::CoreDocs.best_download
  Solargraph::YardMap::CoreDocs.download ver
  host.show_message "Downloaded documentation for Ruby #{ver}.", LanguageServer::MessageTypes::INFO
rescue StandardError => e
  host.show_message "An error occurred while downloading documentation: [#{e.class}] #{e.message}", LanguageServer::MessageTypes::ERROR
end