Class: Handler
- Inherits:
-
Object
- Object
- Handler
- Defined in:
- lib/rubocop/lsp/handler.rb
Constant Summary collapse
- Interface =
LanguageServer::Protocol::Interface
- Constant =
LanguageServer::Protocol::Constant
Instance Method Summary collapse
- #config(&blk) ⇒ Object
-
#initialize ⇒ Handler
constructor
A new instance of Handler.
- #start ⇒ Object
Constructor Details
#initialize ⇒ Handler
Returns a new instance of Handler.
10 11 12 13 14 15 |
# File 'lib/rubocop/lsp/handler.rb', line 10 def initialize @writer = LanguageServer::Protocol::Transport::Stdio::Writer.new @reader = LanguageServer::Protocol::Transport::Stdio::Reader.new @handlers = {} @store = StateStore.new end |
Instance Method Details
#config(&blk) ⇒ Object
17 18 19 |
# File 'lib/rubocop/lsp/handler.rb', line 17 def config(&blk) instance_exec(&blk) end |
#start ⇒ Object
21 22 23 24 25 |
# File 'lib/rubocop/lsp/handler.rb', line 21 def start reader.read do |request| handle(request) end end |