Class: RubyLsp::Message Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_lsp/utils.rb

Overview

This class is abstract.

A notification to be sent to the client

Direct Known Subclasses

Notification, Request

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method:, params:) ⇒ Message

: (method: String, params: Object) -> void



48
49
50
51
# File 'lib/ruby_lsp/utils.rb', line 48

def initialize(method:, params:)
  @method = method
  @params = params
end

Instance Attribute Details

#methodObject (readonly)

: String



42
43
44
# File 'lib/ruby_lsp/utils.rb', line 42

def method
  @method
end

#paramsObject (readonly)

: Object



45
46
47
# File 'lib/ruby_lsp/utils.rb', line 45

def params
  @params
end

Instance Method Details

#to_hashObject

This method is abstract.

: -> Hash[Symbol, untyped]



55
56
57
# File 'lib/ruby_lsp/utils.rb', line 55

def to_hash
  raise AbstractMethodInvokedError
end