module Solargraph
The top-level namespace for the Solargraph code mapping, documentation, static analysis, and language server libraries.
@todo PR the RBS gem to add this @!parse
module ::Gem class SpecFetcher; end end
@!parse
module ::Kramdown class Document # @return [String] def to_html; end end end module ReverseMarkdown # @param input [String] # @param options [Hash] # @return [String] def self.convert(input, options = {}); end end
Constants
- CHDIR_MUTEX
- VERSION
- VIEWS_PATH
Public Class Methods
Source
# File lib/solargraph.rb, line 74 def self.assert_or_log(type, msg = nil, &block) raise (msg || block.call) if asserts_on?(type) && ![:combine_with_visibility].include?(type) logger.info msg, &block end
@param type [Symbol] The type of assertion to perform. @param msg [String, nil] An optional message to log @param block [Proc] A block that returns a message to log @return [void]
Source
# File lib/solargraph.rb, line 59 def self.asserts_on?(type) if ENV['SOLARGRAPH_ASSERTS'].nil? || ENV['SOLARGRAPH_ASSERTS'].empty? false elsif ENV['SOLARGRAPH_ASSERTS'] == 'on' true else logger.warn "Unrecognized SOLARGRAPH_ASSERTS value: #{ENV['SOLARGRAPH_ASSERTS']}" false end end
@param type [Symbol] Type of assert.
Source
# File lib/solargraph.rb, line 82 def self.logger Solargraph::Logging.logger end
A convenience method for Solargraph::Logging.logger.
@return [Logger]
Source
# File lib/solargraph.rb, line 93 def self.with_clean_env &block meth = if Bundler.respond_to?(:with_original_env) :with_original_env else :with_clean_env end Bundler.send meth, &block end
A helper method that runs Bundler.with_unbundled_env or falls back to Bundler.with_clean_env for earlier versions of Bundler.
@generic T @yieldreturn [generic<T>] @sg-ignore dynamic call, but both functions behave the same @return [generic<T>]