Module: RuboCop::LSP
- Defined in:
- lib/rubocop/lsp.rb,
lib/rubocop/lsp/logger.rb,
lib/rubocop/lsp/routes.rb,
lib/rubocop/lsp/server.rb,
lib/rubocop/lsp/runtime.rb,
lib/rubocop/lsp/severity.rb
Overview
The RuboCop’s built-in LSP module.
Defined Under Namespace
Classes: Logger, Routes, Runtime, Server, Severity
Class Method Summary collapse
-
.disable(&block) ⇒ void
Disable LSP.
-
.enable ⇒ void
Enable LSP.
-
.enabled? ⇒ Boolean
Returns true when LSP is enabled, false when disabled.
Class Method Details
.disable(&block) ⇒ void
This method returns an undefined value.
Disable LSP.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rubocop/lsp.rb', line 25 def disable(&block) if block original = @enabled @enabled = false yield @enabled = original else @enabled = false end end |
.enable ⇒ void
This method returns an undefined value.
Enable LSP.
18 19 20 |
# File 'lib/rubocop/lsp.rb', line 18 def enable @enabled = true end |
.enabled? ⇒ Boolean
Returns true when LSP is enabled, false when disabled.
11 12 13 |
# File 'lib/rubocop/lsp.rb', line 11 def enabled? @enabled ||= false end |