Class: Solargraph::LanguageServer::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/solargraph/language_server/request.rb

Instance Method Summary collapse

Constructor Details

#initialize(id, &block) ⇒ Request

Returns a new instance of Request.

Parameters:

  • id (Integer)
  • &block

    The block that processes the client’s response



8
9
10
11
# File 'lib/solargraph/language_server/request.rb', line 8

def initialize id, &block
  @id = id
  @block = block
end

Instance Method Details

#process(result) ⇒ void

This method returns an undefined value.

Parameters:

  • result (Object)


15
16
17
# File 'lib/solargraph/language_server/request.rb', line 15

def process result
  @block.call(result) unless @block.nil?
end

#send_responseObject



19
20
21
# File 'lib/solargraph/language_server/request.rb', line 19

def send_response
  # noop
end