class LanguageServer::Protocol::Interface::NotificationMessage

Attributes

attributes[R]

Public Class Methods

new(jsonrpc:, method:, params: nil) click to toggle source
# File lib/language_server/protocol/interface/notification_message.rb, line 5
def initialize(jsonrpc:, method:, params: nil)
  @attributes = {}

  @attributes[:jsonrpc] = jsonrpc
  @attributes[:method] = method
  @attributes[:params] = params if params

  @attributes.freeze
end

Public Instance Methods

jsonrpc() click to toggle source

@return [string]

# File lib/language_server/protocol/interface/notification_message.rb, line 16
def jsonrpc
  attributes.fetch(:jsonrpc)
end
method() click to toggle source

The method to be invoked.

@return [string]

# File lib/language_server/protocol/interface/notification_message.rb, line 24
def method
  attributes.fetch(:method)
end
params() click to toggle source

The notification's params.

@return [any]

# File lib/language_server/protocol/interface/notification_message.rb, line 32
def params
  attributes.fetch(:params)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/notification_message.rb, line 38
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/notification_message.rb, line 42
def to_json(*args)
  to_hash.to_json(*args)
end