Class: LanguageServer::Protocol::Interface::ShowMessageRequestParams
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::ShowMessageRequestParams
- Defined in:
- lib/language_server/protocol/interface/show_message_request_params.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#actions ⇒ MessageActionItem[]
The message action items to present.
-
#initialize(type:, message:, actions: nil) ⇒ ShowMessageRequestParams
constructor
A new instance of ShowMessageRequestParams.
-
#message ⇒ string
The actual message.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#type ⇒ MessageType
The message type.
Constructor Details
#initialize(type:, message:, actions: nil) ⇒ ShowMessageRequestParams
Returns a new instance of ShowMessageRequestParams.
5 6 7 8 9 10 11 12 13 |
# 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] = @attributes[:actions] = actions if actions @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
39 40 41 |
# File 'lib/language_server/protocol/interface/show_message_request_params.rb', line 39 def attributes @attributes end |
Instance Method Details
#actions ⇒ MessageActionItem[]
The message action items to present.
35 36 37 |
# File 'lib/language_server/protocol/interface/show_message_request_params.rb', line 35 def actions attributes.fetch(:actions) end |
#message ⇒ string
The actual message
27 28 29 |
# File 'lib/language_server/protocol/interface/show_message_request_params.rb', line 27 def attributes.fetch(:message) end |
#to_hash ⇒ Object
41 42 43 |
# File 'lib/language_server/protocol/interface/show_message_request_params.rb', line 41 def to_hash attributes end |
#to_json(*args) ⇒ Object
45 46 47 |
# File 'lib/language_server/protocol/interface/show_message_request_params.rb', line 45 def to_json(*args) to_hash.to_json(*args) end |
#type ⇒ MessageType
The message type. See MessageType
19 20 21 |
# File 'lib/language_server/protocol/interface/show_message_request_params.rb', line 19 def type attributes.fetch(:type) end |