class LanguageServer::Protocol::Interface::RequestMessage
Attributes
attributes[R]
Public Class Methods
new(jsonrpc:, id:, method:, params: nil)
click to toggle source
# File lib/language_server/protocol/interface/request_message.rb, line 5 def initialize(jsonrpc:, id:, method:, params: nil) @attributes = {} @attributes[:jsonrpc] = jsonrpc @attributes[:id] = id @attributes[:method] = method @attributes[:params] = params if params @attributes.freeze end
Public Instance Methods
id()
click to toggle source
The request id.
@return [string | number]
# File lib/language_server/protocol/interface/request_message.rb, line 25 def id attributes.fetch(:id) end
jsonrpc()
click to toggle source
@return [string]
# File lib/language_server/protocol/interface/request_message.rb, line 17 def jsonrpc attributes.fetch(:jsonrpc) end
method()
click to toggle source
The method to be invoked.
@return [string]
# File lib/language_server/protocol/interface/request_message.rb, line 33 def method attributes.fetch(:method) end
params()
click to toggle source
The method's params.
@return [any]
# File lib/language_server/protocol/interface/request_message.rb, line 41 def params attributes.fetch(:params) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/request_message.rb, line 47 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/request_message.rb, line 51 def to_json(*args) to_hash.to_json(*args) end