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



6
7
8
9
# File 'lib/solargraph/language_server/request.rb', line 6

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

Instance Method Details

#process(result) ⇒ void

This method returns an undefined value.

Parameters:

  • result (Object)


13
14
15
# File 'lib/solargraph/language_server/request.rb', line 13

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

#send_responseObject



17
18
19
# File 'lib/solargraph/language_server/request.rb', line 17

def send_response
  # noop
end