Class: LSP::ShowMessageRequestParams

Inherits:
LSPBase
  • Object
show all
Defined in:
lib/lsp/lsp_protocol.rb

Overview

export interface ShowMessageRequestParams

/**
 * The message type. See {@link MessageType
 */
type: MessageType;
/**
 * The actual message
 */
message: string;
/**
 * The message action items to present.
 */
actions?: MessageActionItem[];

}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ ShowMessageRequestParams

Returns a new instance of ShowMessageRequestParams.



422
423
424
425
# File 'lib/lsp/lsp_protocol.rb', line 422

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[actions]
end

Instance Attribute Details

#actionsObject

type: MessageType # type: string # type: MessageActionItem[]



420
421
422
# File 'lib/lsp/lsp_protocol.rb', line 420

def actions
  @actions
end

#messageObject

type: MessageType # type: string # type: MessageActionItem[]



420
421
422
# File 'lib/lsp/lsp_protocol.rb', line 420

def message
  @message
end

#typeObject

type: MessageType # type: string # type: MessageActionItem[]



420
421
422
# File 'lib/lsp/lsp_protocol.rb', line 420

def type
  @type
end

Instance Method Details

#from_h!(value) ⇒ Object



427
428
429
430
431
432
433
# File 'lib/lsp/lsp_protocol.rb', line 427

def from_h!(value)
  value = {} if value.nil?
  self.type = value['type'] # Unknown type
  self.message = value['message']
  self.actions = to_typed_aray(value['actions'], MessageActionItem)
  self
end