Class: LSP::ShowMessageRequestParams
- 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
-
#actions ⇒ Object
type: MessageType # type: string # type: MessageActionItem[].
-
#message ⇒ Object
type: MessageType # type: string # type: MessageActionItem[].
-
#type ⇒ Object
type: MessageType # type: string # type: MessageActionItem[].
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ ShowMessageRequestParams
constructor
A new instance of ShowMessageRequestParams.
Methods inherited from LSPBase
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
#actions ⇒ Object
type: MessageType # type: string # type: MessageActionItem[]
420 421 422 |
# File 'lib/lsp/lsp_protocol.rb', line 420 def actions @actions end |
#message ⇒ Object
type: MessageType # type: string # type: MessageActionItem[]
420 421 422 |
# File 'lib/lsp/lsp_protocol.rb', line 420 def @message end |
#type ⇒ Object
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. = value['message'] self.actions = to_typed_aray(value['actions'], MessageActionItem) self end |