class LanguageServer::Protocol::Interface::ShowMessageRequestParams

Attributes

attributes[R]

Public Class Methods

new(type:, message:, actions: nil) click to toggle source
# File lib/language_server/protocol/interface/show_message_request_params.rb, line 5
def initialize(type:, message:, actions: nil)
  @attributes = {}

  @attributes[:type] = type
  @attributes[:message] = message
  @attributes[:actions] = actions if actions

  @attributes.freeze
end

Public Instance Methods

actions() click to toggle source

The message action items to present.

@return [MessageActionItem

# File lib/language_server/protocol/interface/show_message_request_params.rb, line 35
def actions
  attributes.fetch(:actions)
end
message() click to toggle source

The actual message

@return [string]

# File lib/language_server/protocol/interface/show_message_request_params.rb, line 27
def message
  attributes.fetch(:message)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/show_message_request_params.rb, line 41
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/show_message_request_params.rb, line 45
def to_json(*args)
  to_hash.to_json(*args)
end
type() click to toggle source

The message type. See {@link MessageType}

@return [MessageType]

# File lib/language_server/protocol/interface/show_message_request_params.rb, line 19
def type
  attributes.fetch(:type)
end